You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When an orchestrator delegates a task via delegate_task, today the child receives goal and context as strings in its system prompt. Everything the parent already learned about the task — which files it read, which commands it ran, what error messages it saw — gets discarded. The child has to re-explore from scratch.
In the delegation benchmark we ran on the Hermes / hermes-sci stack (MiniMax-M2.7 orchestrator + claude -p worker), this re-exploration was the single largest source of latency for medium tasks. Example trace shape from the eval:
parent: read_file src/X.py → saw import error
parent: grep for Y → found 3 call sites
parent: delegate_task(goal="fix the import") ← child starts blind
child : read_file src/X.py ← repeat
child : grep for Y ← repeat
child : … then fix
On unfamiliar-repo tasks the child can spend 30-60s re-doing exploration the parent just did.
Proposal
Extend delegate_task with a structured handoff payload (optional, orchestrator-built), not just free-text context:
delegate_task(
goal="fix the failing type in src/X.py:42",
handoff={
"read_files": ["src/X.py", "src/Y.py"], # child should hydrate these without re-reading"ran_commands":[{"cmd":"pytest -k X","rc":1,"tail":"<last 400 lines>"}],
"probe_results":{"grep Y":"3 hits in src/"},
"dead_ends": ["tried monkey-patching at module level, reverted"],
},
)
Child's sandbox is pre-populated with:
File contents cached so the first read_file on a handoff path is a local hit, not a disk read
Command results preloaded into the child's tool-history so it won't re-run them
dead_ends surfaced as a "don't retry" note in the child's system prompt
Why it matters
Latency — avoids the most common delegation waste.
Token cost — child doesn't pay input tokens to re-stat/re-grep the codebase.
Decision quality — child sees what the parent actually tried and failed, not a summarized prompt.
This is about one-shot synchronous delegation (delegate_task). Persistent subagents (Persistent ACP background subagents #4949) solve a different problem (long-lived workers); a warm subagent already has its own running context.
Serialization surface: the orchestrator is responsible for pruning handoff to fit the child's context window. A safe default is "last N file reads + last K commands + goal-adjacent grep hits," trimmed to e.g. 20-30% of the child's context budget.
Doesn't require changes to worker backends — a single system-prompt block with context-dump fences is enough to start; richer tool-history preload can follow.
Evidence
Internal delegation benchmark (30 trials × 3 strategies × 10 tasks): strategy C (selective delegation with rule-based context passing via SOUL.md) won the two hardest tasks including task10-unfamiliar-repo (109s vs 145s pure-local, 234s uniform-delegation). The rule-based "tell the worker what you already looked at" pattern that made C work is exactly what this feature would codify.
Problem
When an orchestrator delegates a task via
delegate_task, today the child receivesgoalandcontextas strings in its system prompt. Everything the parent already learned about the task — which files it read, which commands it ran, what error messages it saw — gets discarded. The child has to re-explore from scratch.In the delegation benchmark we ran on the Hermes / hermes-sci stack (MiniMax-M2.7 orchestrator +
claude -pworker), this re-exploration was the single largest source of latency for medium tasks. Example trace shape from the eval:On unfamiliar-repo tasks the child can spend 30-60s re-doing exploration the parent just did.
Proposal
Extend
delegate_taskwith a structuredhandoffpayload (optional, orchestrator-built), not just free-text context:Child's sandbox is pre-populated with:
read_fileon a handoff path is a local hit, not a disk readdead_endssurfaced as a "don't retry" note in the child's system promptWhy it matters
Scope / non-goals
delegate_task). Persistent subagents (Persistent ACP background subagents #4949) solve a different problem (long-lived workers); a warm subagent already has its own running context.handoffto fit the child's context window. A safe default is "last N file reads + last K commands + goal-adjacent grep hits," trimmed to e.g. 20-30% of the child's context budget.context-dumpfences is enough to start; richer tool-history preload can follow.Evidence