Skip to content

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

fix(spawn_subagent): refuse duplicate child for reusable task

Steven Enamakel0f8de7b8d36e
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent_host_impl.rs b/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent_host_impl.rs
index 1351f458d2..6958a29fec 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent_host_impl.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent_host_impl.rs
@@ -467,6 +467,9 @@ impl SpawnSubagentTool {
definition.id,
err
);
+ return Ok(ToolResult::error(format!(
+ "spawn_subagent: refusing to start a duplicate child for reusable task '{running_task_id}': {err}"
+ )));
}
}
}