Skip to content

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

refactor(agent): deduplicate subagent completion closure captures

Steven Enamakeld323d966973b
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 beb16b4f12..7f4ac55ee7 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
@@ -370,6 +370,7 @@ impl SpawnAsyncSubagentTool {
);
let completion_core = dispatch.clone().into_core();
let completion_origin = detached_parent.data.origin.clone();
+ let completion_worker_thread_id = background_worker_thread_id.clone();
let completion = move |_target: String,
result: Result<SubagentRunOutcome, String>,
emit_lifecycle_effects: bool|
@@ -383,17 +384,7 @@ impl SpawnAsyncSubagentTool {
let background_task_id = background_task_id.clone();
let background_parent_session = background_parent_session.clone();
let completion_target = completion_target.clone();
- let background_worker_thread_id = background_worker_thread_id.clone();
- let background_store = background_store.clone();
- let background_subagent_session_id = background_subagent_session_id.clone();
- let background_parent_thread_id = background_parent_thread_id.clone();
- let background_workspace_dir = background_workspace_dir.clone();
- let background_dispatch = background_dispatch.clone();
- let background_agent_id = background_agent_id.clone();
- let background_task_id = background_task_id.clone();
- let background_parent_session = background_parent_session.clone();
- let completion_target = completion_target.clone();
- let background_worker_thread_id = background_worker_thread_id.clone();
+ let background_worker_thread_id = completion_worker_thread_id.clone();
let background_store = background_store.clone();
let background_subagent_session_id = background_subagent_session_id.clone();
let background_parent_thread_id = background_parent_thread_id.clone();
diff --git a/vendor/tinyagents b/vendor/tinyagents
index 61b7a911a7..c2de64e1a7 160000
--- a/vendor/tinyagents
+++ b/vendor/tinyagents
@@ -1 +1 @@
-Subproject commit 61b7a911a77bc45fb4c44f63bebfb96f450a9131
+Subproject commit c2de64e1a70891b9e6d28447a450da7a9f4ad882