Repository navigation
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The test fed the second subagent's progress before the wake turn started, so it ran under the launching turn and passed without the fix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Problem
When Claude runs several background subagents, the "N subagents" group card in the parent thread splits while they work. Some subagents drop out of the group into their own row below it, and the group's count goes down (I saw 5 become 3, with 2 outside the box). Expected: all subagents launched together stay in one group until they finish.
Change
Clients group subagent cards by
(runId, providerTurnId).ClaudeAdapterV2keeps a subagent card'srunIdandordinalfixed, but it stamped every card update withinput.context.providerTurnId, which is whatever Claude turn is active at that moment. A background subagent that reports progress or finishes after the parent has moved to a later turn (for example, the wake turn for a sibling's completion) took that turn's id and left its group. The Codex adapter already pins its cards to the launching turn (parentContext.providerTurnId).ActiveClaudeSubagentnow records theproviderTurnIdthe card was launched in and reuses it for every update. A resumed subagent that moves to the current run (the existingrunIdreassignment) also takes the current turn, so its turn stays consistent with itsrunId.Scope
Bug fix in one adapter. Small fix for an obvious grouping bug, so no separate issue. #41358 fixes the same class of problem (late updates moving an item to a newer run) for tool items in
EventSink, but it does not cover subagent cards.Verification
keeps a background subagent's card on the turn that launched ittoClaudeAdapterV2.test.ts. Two background subagents start in turn 1. The first finishes and wakes the parent. The second reports progress and finishes during the wake turn. Onmainit fails: the second card moves toturn:attempt-claude-card-turn-2. With this change it passes.ClaudeAdapterV2.test.ts(491 tests) passes. 3 tests fail the same way onmainand on this branch on my Windows machine: the native fork cwd test and two "model change after a Claude Code update" tests. They look environment-specific and are unrelated to this change.apps/servertypecheck (effect-tsgo tsrs --noEmit) has no errors, and fmt, lint and knip pass.Model: Claude Opus 5.5 in T3 Code