Repository navigation
feat(subagent): classify terminal subagent failures with typed record - #1391
Conversation
9a71c76 to
633c75a
Compare
d4ad7ef to
3347ae6
Compare
TheGreatAxios
left a comment
There was a problem hiding this comment.
Typed failure record implemented as claimed — classification, once-only cleanup, handoff gating, and the no-spawn-behavior-change invariant all verified (904/0 subagent suite). Three items: follow-up-turn failures bypass the classifier (should-fix — same failure records 'interrupted' via send_input vs 'provider_retryable' via resume_agent), ~270 comment-only lines referencing unrelated tickets, and the body's AC-to-code line map is stale after the rebase.
AC2 cites agent-fleet.ts:2168-2176 (past EOF; file is 2146 lines; actual 487-505/2123); AC8 cites session-store.ts:1690-1702 (actual handoff evidence 1589-1600); AC4/AC5 shifted after rebase (run.ts:692-694; session-store.ts:790-818). Refresh the map at head.
Plain: the description's line references point at the wrong places — one past the end of the file — after a rebase. Update them.
30e4eca to
fb9b903
Compare
7d1bdcf to
3dbdbc3
Compare
fb9b903 to
b406132
Compare
b406132 to
169e718
Compare
A failed worker reached the parent as two booleans and error prose, so the parent could not tell a transient provider fault from a stuck or cancelled lane, and an answered ask_director left no trace once the run died. The store now writes one frozen failure record in the same mutation that makes a non-clean terminal visible, and provider_failure and continuable derive from its class so every projection agrees.
The reactor's doom-loop guard already stops workers, but the run ended as a plain error and its class survived only in the reactor message. The doom_loop run end reaches the stream after the send rejects, so the run notes it in its stream sink and rethrows a typed error once teardown has drained the stream. A forced-stop reason would have taken the salvage path and turned the failed lane into a done one. The run also reports when its own teardown fails, which is the release step behind a partial cleanup outcome.
3dbdbc3 to
694fbd2
Compare
PR 1 of 2: classification and record (stack base)
This is PR 1 of the two-PR CL-10202 delivery. It adds typed failure classification and the failure record, with no behavior change to spawning. The stacked follow-up PR 2 (enforced recovery,
recoversonspawn_agent) builds on this branch.Summary
terminal_failurerecord with afailure_classfield, replacing prose-parsed failure strings.loop_guard, distinct from provider-level failures.recovery.availablemirrors today'scontinuable(invariantcontinuable === recovery.available) and thecontinue_withtext is unchanged.Verification
After the rebase onto main and the review fixes, CI passes on 3dbdbc3; the results below are from the original verification.
Gates run independently on tip 9a71c76 (exit code 0 everywhere):
AC to code and test mapping
Deferred / Notes
Refs CL-10202