Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(agent): handle missing optional fields in prompt rendering\n\nWhen rendering prompts, optional fields that were not set could cause rendering failures or produce unexpected output. This change adds proper handling for absent optional fields, ensuring they are gracefully skipped or replaced with sensible defaults during prompt construction.\n\nAuto-committed-on: macbook\n

Steven Enamakel59ee0cf4296c
diff --git a/src/openhuman/agent/prompts/render_helpers.rs b/src/openhuman/agent/prompts/render_helpers.rs
index 91f2f81f5b..06954a4400 100644
--- a/src/openhuman/agent/prompts/render_helpers.rs
+++ b/src/openhuman/agent/prompts/render_helpers.rs
@@ -768,6 +768,13 @@ pub fn default_workspace_file_content(filename: &str) -> &'static str {
match filename {
"SOUL.md" => include_str!("SOUL.md"),
"IDENTITY.md" => include_str!("IDENTITY.md"),
+ // The user-facing agent's role brief and writing style, moved out of
+ // the compiled `orchestrator/prompt.md` so both are tunable on disk
+ // without a rebuild (#5701). Same sync-and-inject contract as
+ // SOUL.md / IDENTITY.md: the bundled copy seeds the workspace, and a
+ // user edit wins from the next session on.
+ "ROLE.md" => include_str!("ROLE.md"),
+ "STYLE.md" => include_str!("STYLE.md"),
"HEARTBEAT.md" => {
"# Periodic Tasks\n\n# Add tasks below (one per line, starting with `- `)\n"
}