Skip to content

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

fix: fall back to configured root agents when target agent is missing

Steven Enamakel7c6992422f82
diff --git a/crates/openhuman-core/src/agent/bus.rs b/crates/openhuman-core/src/agent/bus.rs
index 64d22a1749..57c68b7158 100644
--- a/crates/openhuman-core/src/agent/bus.rs
+++ b/crates/openhuman-core/src/agent/bus.rs
@@ -295,7 +295,8 @@ async fn handle_agent_run_turn(req: AgentTurnRequest) -> Result<AgentTurnRespons
.unwrap_or_default();
let memory_agent = target_agent_id
.clone()
- .unwrap_or_else(|| crate::config::schema::memory::DEFAULT_ROOT_AGENTS[0].to_string());
+ .or_else(|| memory_config.memory.root_agents.first().cloned())
+ .unwrap_or_default();
let outcome = turn_origin::with_origin(
origin,
crate::memory::scope::within_agent(&memory_config, &memory_agent, with_file_state_agent_id(