Skip to content

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

fix(agent): use scoped runtime spawn for async subagent tasks

Steven Enamakel3698148774f9
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 5006e5c60b..708c15d7e1 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
@@ -421,7 +421,7 @@ impl SpawnAsyncSubagentTool {
// below is a staging bridge for those two scopes only.
let detached_run_context = detached_parent.data.child();
let mut abort_report = AbortReport::arm(progress_sink.clone(), &definition.id, &task_id);
- let join = tokio::spawn(crate::agent::turn_origin::propagate(
+ let join = crate::core::runtime::spawn_scoped(crate::agent::turn_origin::propagate(
crate::agent::turn_workspace::propagate(async move {
let options = SubagentRunOptions {
skill_filter_override: None,