Skip to content

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

fix(agent): report subagent registration failures via progress channel

Steven Enamakel707c1d0ddb6f
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent_execute.rs b/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent_execute.rs
index 6df9b73d37..a94e8ba908 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent_execute.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent_execute.rs
@@ -765,6 +765,15 @@ impl SpawnAsyncSubagentTool {
registration_agent_id.clone(),
message.clone(),
);
+ if let Some(progress) = registration_progress {
+ let _ = progress
+ .send(AgentProgress::SubagentFailed {
+ agent_id: registration_agent_id,
+ task_id: registration_task_id,
+ error: message,
+ })
+ .await;
+ }
return Ok(ToolResult::error(format!(
"spawn_async_subagent: failed to register detached sub-agent: {error}"
)));