Skip to content

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

fix: correct subagent spawn to use worker thread pool

Steven Enamakelcd452c4f6a9c
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent_tests.rs b/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent_tests.rs
index 203df7797a..5534d4b477 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent_tests.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent_tests.rs
@@ -32,9 +32,13 @@ fn parameters_schema_advertises_fire_and_forget_fields() {
.get("properties")
.and_then(|v| v.as_object())
.expect("properties");
- for key in ["context", "model", "toolkit", "task_title"] {
+ for key in ["context", "model", "task_title"] {
assert!(props.contains_key(key), "missing {key}");
}
+ assert!(
+ !props.contains_key("toolkit"),
+ "the retired toolkit spawn argument must not be advertised"
+ );
}
#[test]
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent_parameters.rs b/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent_parameters.rs
index b9a395a378..a8d9d59b15 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent_parameters.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent_parameters.rs
@@ -55,10 +55,6 @@ fn spawn_subagent_parameters_schema() -> serde_json::Value {
"type": "string",
"description": "Optional exact model id for this spawn only. Keeps the parent provider/routing, but pins the child agent to this model instead of the agent definition's default."
},
- "toolkit": {
- "type": "string",
- "description": "Optional Composio toolkit slug (e.g. `gmail`, `notion`). Narrows the Connected Integrations section of the sub-agent's prompt to that toolkit."
- },
"dedicated_thread": {
"type": "boolean",
"description": "Legacy compatibility flag. Delegations now always create a persistent worker thread when parent context is available, so this flag no longer gates thread creation."
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent_tool_impl.rs b/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent_tool_impl.rs
index 1042314066..f51aece529 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent_tool_impl.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent_tool_impl.rs
@@ -108,12 +108,6 @@ impl SpawnSubagentTool {
.map(|s| s.trim().to_string())
.filter(|s| !s.is_empty());
- let toolkit_override = args
- .get("toolkit")
- .and_then(|v| v.as_str())
- .map(|s| s.trim().to_string())
- .filter(|s| !s.is_empty());
-
// Worker threads are now always created for delegations that may
// need follow-up (checkpoint + replay for ask_user_clarification).
// The `dedicated_thread` parameter is accepted but no longer
@@ -321,7 +315,6 @@ impl SpawnSubagentTool {
.map(|parent| parent.workspace_dir.clone());
let options = SubagentRunOptions {
skill_filter_override: None,
- toolkit_override,
context,
model_override,
task_id: Some(task_id.clone()),
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/spawn_worker_thread.rs b/crates/openhuman-core/src/agent/orchestration/tools/spawn_worker_thread.rs
index e783bd7488..259da5e47b 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/spawn_worker_thread.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/spawn_worker_thread.rs
@@ -122,10 +122,6 @@ impl Tool for SpawnWorkerThreadTool {
"type": "string",
"description": "Optional context blob from prior task results. Rendered as a `[Context]` block before the prompt."
},
- "toolkit": {
- "type": "string",
- "description": "Composio toolkit slug to scope this spawn to (e.g. `gmail`, `notion`)."
- },
"model": {
"type": "string",
"description": "Optional exact model id for this spawn only. Keeps the parent provider/routing, but pins the worker child agent to this model instead of the agent definition's default."
@@ -215,10 +211,6 @@ impl SpawnWorkerThreadTool {
.get("context")
.and_then(|v| v.as_str())
.map(|s| s.to_string());
- let toolkit_override = args
- .get("toolkit")
- .and_then(|v| v.as_str())
- .map(|s| s.to_string());
let model_override = args
.get("model")
.and_then(|v| v.as_str())
@@ -251,7 +243,6 @@ impl SpawnWorkerThreadTool {
agent_id = %agent_id,
task_title = %task_title,
current_thread_id = %current_thread_id,
- toolkit_override = ?toolkit_override,
has_context = context.is_some(),
"[spawn_worker_thread] invoked"
);
@@ -337,7 +328,6 @@ impl SpawnWorkerThreadTool {
let progress_sink = run_context.progress.clone();
let options = SubagentRunOptions {
skill_filter_override: None,
- toolkit_override,
context,
model_override,
task_id: None,