Skip to content

fix(server): finished Claude subagents leave no running rows - #13730

Merged
juliusmarminge merged 1 commit into
t3code/codex-turn-mappingfrom
v2/claude-subagent-progress-rows
Sep 26, 2026
Merged

juliusmarminge merged 1 commit into
t3code/codex-turn-mappingfrom
v2/claude-subagent-progress-rows

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Sep 26, 2026 •

Copy link
Copy Markdown
Member

A finished Claude subagent thread ("Completed in 8.0s") still showed "Running Look for math.ts in expected locations and repo" as if a step were in progress. That row is not a stuck tool call. It is the task_progress summary from the first run, which the adapter copied into the child thread as a reasoning item titled "Subagent progress".

What I found

In the live DB snapshot and provider log for the "Review src/math.ts" subagent (task ace7749263e8a24e3), the item is task:ace7749263e8a24e3:progress:

  • Claude's text is task_progress.description: "Running Look for math.ts in expected locations and repo".
  • Its status is already completed, set at the first run's task_notification. Every other child item in that thread is also terminal: the tool calls are completed/failed and the root turn is completed.
  • Neither the notification path nor the fix(server): a resumed Claude subagent's thread shows the message that resumed it #13668 resume path leaves it open. The problem is the text, which renders as a "Running …" reasoning row after the work is done.
  • The item also repeats what the child already shows: the same step appears as the subagent's own Bash call and thinking in that thread.

What changed

ClaudeAdapterV2 no longer writes the progress summary into the child thread. It stays on the parent's subagent (subagent.progress), which the subagent card and tooltip already show (web and mobile). The child thread now holds only the subagent's own prompts, tool calls, thinking, and answers. Other providers never emitted this item.

Verification

  • claude_background_subagent_lifecycle replay fixture: added an assertion that every child item in both subagents' threads is terminal and that no child reasoning item other than the subagent's own thinking is present. Agent B's recorded task_progress ("Running Wait 90 seconds then print B_DONE") stays on its parent subagent. The assertion fails before the adapter change (on task:af44d5c14aa3ce867:progress) and passes after it.
  • subagent replay fixture (Claude): it asserted that the child held exactly one progress reasoning item, and its expected child item types listed reasoning only because of that item. It now asserts that the child does not repeat the progress text. subagent.progress is still asserted on the parent.
  • FoundationPersistence.test.ts: the recovery test's seeded streaming child item was labelled as the adapter's progress item. It is now a plain streaming thinking item, and the behavior under test (recovery settles a live child item) is unchanged.
  • apps/server: vp test run src/orchestration-v2/Adapters/ClaudeAdapterV2.test.ts src/orchestration-v2/FoundationPersistence.test.ts src/orchestration-v2/testkit/OrchestratorReplayFixtures.integration.test.ts src/orchestration-v2/testkit/ClaudeReplayFixtures.integration.test.ts: all pass. vp exec tsc --noEmit -p .: no errors or warnings. vp lint on the touched files shows only the existing unused layer warning from the base branch. vp run knip:check is clean.
  • Not run: a live Claude session.

Model: Claude Opus 5.5 (Claude Code)

🤖 Generated with Claude Code


Devin Review

The Claude adapter copied each task_progress description ("Running
<step>") into the subagent's child thread as a reasoning item titled
"Subagent progress". The row was settled to completed when the run
ended, but its text still read "Running ...", so a finished subagent
thread kept a row that looked like a step in progress. It also repeated
work the child already shows as its own tool calls and thinking.

Progress stays on the parent's subagent card (subagent.progress), where
clients already show it. The child thread now holds only the subagent's
own work.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Sep 26, 2026
@macroscopeapp

macroscopeapp Bot commented Sep 26, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 9bdd7f0

Macroscope's review found this PR approvable — This is a focused Claude subagent projection fix that removes a misleading duplicate progress row from child threads while preserving parent progress and the child’s actual work history. The production change is isolated, non-schema-affecting, and covered by lifecycle replay assertions.

You can add or adjust custom eligibility rules. Learn more.

@github-actions

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

ℹ️ No successful main baseline artifact is available yet. This run establishes the initial measurement.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire — 4.9 KiB — 6.8 KiB ✅
Codex Thread snapshot wire — 3.7 KiB — 4.9 KiB ✅
Codex Live turn WebSocket wire — 1.2 KiB — 2.0 KiB ✅
Codex Live turn WebSocket decoded — 20.4 KiB — 29.3 KiB ✅
Codex Live turn messages — 2 — 8 ✅
Claude Total thread wire — 4.9 KiB — 6.8 KiB ✅
Claude Thread snapshot wire — 3.7 KiB — 4.9 KiB ✅
Claude Live turn WebSocket wire — 1.2 KiB — 2.0 KiB ✅
Claude Live turn WebSocket decoded — 20.7 KiB — 29.3 KiB ✅
Claude Live turn messages — 1 — 8 ✅

Baseline: unavailable · PR result: 9bdd7f0 · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 106.1 KiB
  • Claude decoded thread snapshot: 106.4 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

@juliusmarminge
juliusmarminge merged commit c48e8a9 into t3code/codex-turn-mapping Sep 26, 2026
24 of 25 checks passed
@juliusmarminge
juliusmarminge deleted the v2/claude-subagent-progress-rows branch September 26, 2026 00:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant