Skip to content

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

refactor(subagent_host): adjust agent instruction layer loading logic

Steven Enamakel12502bda5290
diff --git a/crates/openhuman-core/src/agent/subagent_host/ops/runner.rs b/crates/openhuman-core/src/agent/subagent_host/ops/runner.rs
index d7ae735fd3..1d6a858461 100644
--- a/crates/openhuman-core/src/agent/subagent_host/ops/runner.rs
+++ b/crates/openhuman-core/src/agent/subagent_host/ops/runner.rs
@@ -567,8 +567,9 @@ async fn run_typed_mode(
subagent_prompt_protocol(parent.tool_call_format, &filtered_specs);
// Load AGENTS.md instruction layers once, at prompt-build time, when the
// config gate is on. The global layer comes from the workspace dir; the
- // project layer comes from the global config `action_dir`. Loading here
- // (not per turn) keeps the sub-agent system
+ // project layer prefers an explicitly inherited workspace root and falls
+ // back to the global config `action_dir`. Loading here (not per turn) keeps
+ // the sub-agent system
// prompt byte-stable for prefix caching.
let agents_md = if parent.agent_config.agents_md_enabled {
let local_dir = options