Skip to content

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

fix(agent): release driver task when sub-agent registration fails

Steven Enamakel45f6fcf07c2c
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 862a4e448c..2ecc05ac6f 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
@@ -750,6 +750,10 @@ impl SpawnSubagentTool {
})
.await;
}
+ crate::agent::orchestration::completion_owners::finish_driver_task(
+ &dispatch,
+ &registration_task_id,
+ );
return Ok(ToolResult::error(format!(
"spawn_subagent: failed to register detached sub-agent: {error}"
)));