Remove deprecated task spawn tool - #745
Conversation
TheGreatAxios
left a comment
There was a problem hiding this comment.
greybeard · comment
This branch removes the deprecated fused task spawn surface and routes dispatch through spawn_agent plus wait_agents only.
No path:line findings. Approach matches the issue constraints: no compatibility alias, no re-fused wait path, and local/plugin agent profile dispatch remains reachable via spawn_agent(agent=...).
TheGreatAxios
left a comment
There was a problem hiding this comment.
critic · comment
This branch removes the deprecated task tool and updates prompts, tests, docs, telemetry, and eval fixtures for the split fleet contract.
No path:line findings. The follow-up prompt fix includes description in the spawn_agent example and removes the nested search_agents recommendation from the orchestrator appendix.
dec1b7f to
967e9d3
Compare
TheGreatAxios
left a comment
There was a problem hiding this comment.
primary · would request changes
This branch removes the deprecated task wrapper and makes spawn_agent plus wait_agents the only fleet spawn path.
Findings:
src/subagent/agent-fleet.ts:926removes the old long-livedsubagentPerfTrace producer.spawn_agentnow firesdeps.run(params)asynchronously and returns immediately, but nothing opens/closes asubagentspan around that promise. The deletedsrc/perf/permission-subagent-spans.test.tscases were the only coverage proving completed/failed/worktree-setup-failed workers emitted and closedsubagentspans nested under the current turn; meanwhilesrc/perf/index.ts:89still advertisessubagentas a phase and attribution reports still bucket it. PerfTrace now loses child wall-time attribution for fleet work. Please move equivalentstart("subagent")/end(...)coverage to the splitspawn_agentpath or intentionally remove the phase/reporting contract.
4e3e041 to
0135406
Compare
The fused task wrapper is gone, so wait_agents is a long-lived parent tool and spawn_agent progress lasts the worker lifetime. Exec overlay tests now pin that mountFleet:false drops fleet verbs, not merely the old task name.
0135406 to
2922074
Compare
resume_agent marks the followup in flight before the session flips off completed, so the first wait_agents collect could return the prior stamp. Treat in-flight completed and interrupted as wait-running, and omit a leftover report from a failed wait result.
Soft interrupt leaves the run in flight, and wait status treats interrupted+inFlight as running so resume cannot collect a stale stamp. Flip the wait mailbox overlay from interrupt_agent (same as send_input interrupt:true) so wait returns interrupted without waiting for settle.
Summary
Verification
\bun test v1.3.14 (0d9b296a) passes
\ passes
\ passes
\Bundled 984 modules in 112ms
index.js 4.76 MB (entry point)
highlights-ghv9g403.scm 2.86 KB (asset)
tree-sitter-javascript-nd0q4pe9.wasm 0.41 MB (asset)
highlights-eq9cgrbb.scm 9.83 KB (asset)
tree-sitter-typescript-zxjzwt75.wasm 1.41 MB (asset)
highlights-r812a2qc.scm 3.44 KB (asset)
tree-sitter-markdown-411r6y9b.wasm 0.42 MB (asset)
injections-73j83es3.scm 0.82 KB (asset)
highlights-x6tmsnaa.scm 2.15 KB (asset)
tree-sitter-markdown_inline-j5349f42.wasm 0.43 MB (asset)
highlights-hk7bwhj4.scm 3.48 KB (asset)
tree-sitter-zig-e78zbjpm.wasm 0.69 MB (asset)
parser.worker-m4xh6kys.js 172.51 KB (asset)
tree-sitter-3jzf13jk.wasm 205.49 KB (asset) passes
\bun test v1.3.14 (0d9b296a)
rate=15/s [
[ "we " ], [ "we need" ], [ "we need to chec" ], [ "we need to check wheth" ]
]
rate=20/s [
[ "we n" ], [ "we need to" ], [ "we need to check whe" ], [ "we need to check whether the c" ]
]
rate=28/s [
[ "we ne" ], [ "we need to che" ], [ "we need to check whether the" ], [ "we need to check whether the",
"cache key alr"
]
]
rate=40/s [
[ "we need " ], [ "we need to check whe" ], [ "we need to check whether the", "cache key a" ], [ "we need to check whether the", "cache key already accounts for", "" ]
]
rate=60/s [
[ "we need to c" ], [ "we need to check whether the c" ], [ "we need to check whether the",
"cache key already accounts for", ""
], [ "we need to check whether the", "cache key already accounts for", "the locale" ]
]
lifecycleStatus: completed retained: false
resumeOne outcome: {"ok":false,"status":"completed"}
cancelAll returned: [] | close invoked: true
sessions retained despite maxRetained=3: 3 passes with 5662 pass / 0 fail
Fixes CL-7081