Repository navigation
cmux NEXT subagents: a completed turn ends its foreground subagents, so Running counts only live ones - #24031
Conversation
…e (red) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15bd2-60d2-70e1-8179-d3aa717c8828&host=huge-blue
…so Running counts only live ones Leo's Inspector read "5 running" with about 3 live: a foreground subagent whose end the harness never sent read running for good once its turn completed. A completed turn waited on its foreground subagents, so they read done; background ones run on. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15bd2-60d2-70e1-8179-d3aa717c8828&host=huge-blue
|
Owned by summary-panel on huge-blue · session |
|
Found 13 test failures on Blacksmith runners: Failures
...and 3 more test failures. View all on Blacksmith
|
|
Review (subagent, correctness first): SHIP at ec3dac6
|
|
|
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Probably yours: CI failed on
Failures:
Matched log linesNot re-run automatically: Written by red: cmux-next checks (god files, concurrency, crash safety, l10n); no finished base run on 4ae5de4 to compare; do not merge until green; see lane-rules Tour of Gallery before/after for
States
Pick other states with a |
…l calls started Codex's native children (codex-acp nativeSubagentSessions) come with no tool call and no background flag, and run on in their own threads: #24031 would have read them done when the turn completed. Only a subagent a tool call started (Claude's Agent call, which its turn waits on) ends with it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15bd2-60d2-70e1-8179-d3aa717c8828&host=huge-blue
…l calls started; Codex children run on (#24087) * test(acpmux): Codex spawnAgent subagents are background work (red) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15bd2-60d2-70e1-8179-d3aa717c8828&host=huge-blue * acpmux: every Codex spawnAgent subagent is background work, so a completed turn never ends it Codex runs each child in its own thread; the model may end its turn without a wait. Follow-up to #24031's review. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15bd2-60d2-70e1-8179-d3aa717c8828&host=huge-blue * test(cmux-next): a subagent no tool call started runs on after its turn completes (red) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15bd2-60d2-70e1-8179-d3aa717c8828&host=huge-blue * cmux NEXT subagents: a completed turn ends only the subagents its tool calls started Codex's native children (codex-acp nativeSubagentSessions) come with no tool call and no background flag, and run on in their own threads: #24031 would have read them done when the turn completed. Only a subagent a tool call started (Claude's Agent call, which its turn waits on) ends with it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15bd2-60d2-70e1-8179-d3aa717c8828&host=huge-blue --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
|
Shipped in:
|
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
Leo's Inspector read "5 running · 3 failed · 89 done" while about 3 subagents were live (his screenshot from the "THIS BECAME A SIDEBAR FOR NO REASON" report; the panel itself is fixed in #24020).
Cause. The counts, the avatars and the rows all come from one source and agree. What was wrong is a foreground subagent whose end the harness never sent: it read
runningfor good.subagentsLeft(subagents/subagentFold.ts) ended a turn's subagents only when the turn was cancelled or lost (outcome_unknown), never when it completed normally.Fix. A
turn_resultwithstatus: "completed"ends that turn's still-running foreground subagents ascompleted, so they count as done. A completed turn waited on them: Claude's foreground Agent call returns before the turn can end. Two cases are unchanged:background: trueforrun_in_background, workflows, and ones moved to the background (claude_stdio/inbound.rs).Tests (red first).
test/subagent-stopped-after-cancel.test.ts:completed, and a background one from the same turn still readsrunning. Red at d17b3ae.summary-background-work.test.tsx("the card lists running commands…"), fails the same way with base sources.No capture: the Subagents count changes only for a subagent left running after its turn completed, and the tests above pin that.
🤖 Generated with Claude Code
Agent session: huge-blue
Need help on this PR? Tag
@codesmith-botwith what you need.Summary by cubic
Fixes the subagent Running count so a completed turn ends its foreground subagents, which the harness never reported as done.
turn_resultwithstatus: "completed"now ends that turn's still-running foreground subagents ascompleted, so they no longer readrunningforever.runningafter a completed turn; their behavior is unchanged.Written for commit ec3dac6. Summary will update on new commits.