Claude Agent subagent chats show tool calls but never their thinking#27178

opened8d agobyAAustinKostreba

What happened

When I click into a running Claude subagent (started with the Agent tool, run_in_background: false), its chat shows only a list of commands ("Running git show ...") until the subagent finishes. None of its thinking appears, so there is no way to follow what it is doing until its final answer lands. The parent thread's thinking shows normally.

Diagnosis

T3 streams the subagent's tool calls into its child thread correctly. Its thinking never arrives, because the Claude Agent SDK stream does not carry it.

  • In the provider event log for the parent thread, every assistant frame with the subagent's parent_tool_use_id contains only tool_use or text blocks. There are no thinking blocks at all, not even empty ones (12 assistant frames, 0 thinking blocks).
  • The parent's own frames in the same log (parent_tool_use_id: null) carry thinking normally (16 thinking blocks).
  • Claude Code still writes the subagent's thinking to disk. The subagent transcript <session>/subagents/agent-<agentId>.jsonl holds 7 non-empty thinking blocks for the same run. Their timestamps line up with the SDK frames, which carry only the tool call (for example, thinking at 19:48:04.819Z in the transcript, and a tool_use-only frame at 19:48:04.821Z).
  • emitSubagentThinking in apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts projects subagent thinking from these SDK assistant messages. With Claude Code 2.1.312 those messages never contain thinking, so the function never emits anything and the child thread has no reasoning items.

The child thread in statev2.sqlite matches: the user brief, 11 tool items that arrived live between 19:47:59 and 19:48:42, then the final assistant message at 19:49:15, and no reasoning items.

This is a regression. #20856 (merged 2026-10-18) states that Claude CLI 2.1.301 "forwards every message of an ordinary background subagent as SDK frames with parent_tool_use_id" and that "ordinary subagents show their full conversation." With Claude Code 2.1.312, those forwarded frames no longer include thinking blocks, so subagent chats lose the thinking they showed before. #20856 already reads Workflow members' agent-<agentId>.jsonl transcripts and projects them through the same code as forwarded frames. That reader could also supply thinking for native Agent subagents, but I'll leave the choice of fix to you.

I checked upstream/main at 4092c4ac56. emitSubagentThinking is unchanged, and no commit since my build touches this path.

Steps to reproduce

  1. In a Claude thread (Opus, thinking on), ask the agent to run a foreground subagent (Agent with run_in_background: false) on a task that takes several tool calls.
  2. While it runs, click into the subagent to open its chat.
  3. Tool calls appear one at a time. No thinking rows appear, during the run or after it finishes.
  4. Compare with subagents/agent-<agentId>.jsonl for that session under ~/.claude/projects/: it contains the subagent's thinking blocks.

Version

0.1.5-nightly.20261029.3877 (desktop app)

Environment

macOS 26.7.1, Node v24.15.0, Claude Code 2.1.312, model claude-opus-5-5

Evidence

shell
1# Subagent frames from logs/provider/events.<threadId>.log (content block types per assistant frame)
219:47:58.075Z assistant tool_use
319:47:59.391Z assistant tool_use
419:48:04.821Z assistant tool_use
519:48:09.909Z assistant tool_use
6...
719:48:42.454Z assistant tool_use
819:49:15.035Z assistant text
9
10# Parent frames in the same log (parent_tool_use_id null), block types
11 16 thinking
12 21 tool_use
13 8 text
14
15# Same subagent's transcript, subagents/agent-<agentId>.jsonl
1619:48:04.819Z thinking (non-empty)
1719:48:09.878Z thinking (non-empty)
1819:48:15.746Z thinking (non-empty)
19... 7 thinking blocks total, then the final text at 19:49:15.035Z
  • #18798 (closed as not planned on 2026-10-12) reported missing live activity for Workflow members. #20856 later added it by reading their transcripts. This report is about native Agent subagents, which rely on forwarded SDK frames, not transcripts. - #11000 discussed full activity for subagents in general. This report is narrower: thinking that subagent chats showed until Claude Code stopped forwarding it. - #25541 reports missing live progress for native Codex subagents, a different provider and code path.

Fix applied or workaround

None. The subagent's thinking can be read from its transcript file while it runs.

Filed by

Claude Code (claude-opus-5-5), following .github/triage/PLAYBOOK.md