Skip to content

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

refactor(agent): clarify subagent tool usage and context

Steven Enamakel57b6f6cd76e2
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/archetype_delegation_host.rs b/crates/openhuman-core/src/agent/orchestration/tools/archetype_delegation_host.rs
index f72e6d1cf2..841226fbfc 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/archetype_delegation_host.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/archetype_delegation_host.rs
@@ -95,8 +95,7 @@ impl Tool for ArchetypeDelegationTool {
/// TAURI-RUST-8HB `run_code`: thousands of 120.000s truncations). The
/// child's lifetime is already bounded internally — by its `max_iterations`,
/// the run cancellation token, and each inner tool's own timeout — so it
- /// governs its own duration, exactly like the sibling `spawn_parallel_agents`
- /// fan-out and the long-running shell tool.
+ /// governs its own duration independently of the parent turn.
fn timeout_policy(&self, _args: &serde_json::Value) -> ToolTimeout {
ToolTimeout::Unbounded
}
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/archetype_delegation_tests.rs b/crates/openhuman-core/src/agent/orchestration/tools/archetype_delegation_tests.rs
index 98a0d9ee8d..fbec949a0d 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/archetype_delegation_tests.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/archetype_delegation_tests.rs
@@ -26,7 +26,7 @@ fn delegation_opts_out_of_the_global_tool_timeout() {
// TAURI-RUST-K29 / TAURI-RUST-8HB). The child bounds its own lifetime
// via its max_iterations, the run cancellation token, and each inner
// tool's own timeout — so this primitive must be Unbounded, like
- // spawn_parallel_agents and the long-running scripting tools.
+ // long-running scripting tools.
assert_eq!(
sample_tool().timeout_policy(&json!({})),
ToolTimeout::Unbounded,
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 19c27d4b72..5f19d1dd84 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
@@ -11,10 +11,8 @@ impl Tool for SpawnSubagentTool {
immediately — pass `blocking: true` to run it inline and get the \
sub-agent's final output back in this turn. To run several independent \
workers at once (e.g. \"a separate worker for each X\", a council \
- of opinions, or \"fan out over N items\"), use `spawn_parallel_agents` \
- with one task per worker — a SINGLE call that launches them \
- concurrently. Do NOT call this tool in a loop to fan out: repeated \
- `spawn_subagent` calls each delegate a single task and never launch \
+ of opinions, or \"fan out over N items\"), issue separate async \
+ sub-agent requests and collect their results. \
workers concurrently, which serializes the whole request. See the Delegation \
Guide in the system prompt for available agent_ids and when to \
use each."
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/subagent_dispatch_host.rs b/crates/openhuman-core/src/agent/orchestration/tools/subagent_dispatch_host.rs
index 4b0fc50e3f..7953a48cb0 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/subagent_dispatch_host.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/subagent_dispatch_host.rs
@@ -446,8 +446,8 @@ pub(crate) async fn dispatch_subagent_with_live_parent(
iterations: outcome.iterations as u32,
output_chars: outcome.output.chars().count(),
output: outcome.output.clone(),
- // Synchronous delegate dispatch has no worktree
- // isolation (that is a `spawn_subagent` concept).
+ // Synchronous delegate dispatch inherits the
+ // parent's workspace context.
// Not audited for whether this child's spend reached the
// parent turn's ledger, so it stays silent: omission adds
// nothing, which is the status quo. See the field's docs.