[Bug] Subagent final assistant messages not delivered to parent session

Status Open
Reported on v2.1.233
Maintainer reply None cached
Activity 1 comment · opened Aug 15, 2026

Bug Description

# Subagent final output is never delivered to the parent session Version: Claude Code 2.1.233 Platform: Linux 6.12.63, devcontainer, Node v24.15.0 Area: Agent tool / in-process teammates (subagent_type: general-purpose, spawned with a name) ## Summary A spawned subagent completes its task and writes its final assistant message to its own transcript, but that message is never surfaced to the parent session. From the parent's side the agent appears permanently silent while continuing to emit idle_notification heartbeats, so it looks alive but unresponsive. The failure is silent in the worst way: an agent that returns nothing is indistinguishable from an agent that found nothing, so a fan-out "completes" with every branch's work discarded. ## Reproduction 1. Spawn three subagents with the Agent tool: subagent_type: "general-purpose", each with a distinct name, each given a read-only analysis prompt (~500 words, requesting a structured report). 2. Wait. No tool result arrives, and no task-completion notification. 3. SendMessage to each agent asking for status. No reply. 4. SendMessage again — "return whatever you have, mark unfinished sections UNFINISHED". No reply. 5. SendMessage a minimal probe: "Reply with exactly one word and nothing else: READY". No reply. 6. Meanwhile each agent emits {"type":"idle_notification","from":"<name>","idleReason":"available"} to the parent roughly every 2 minutes, indefinitely. ## What the transcripts show ~/.claude/projects/<project-slug>/<session-id>/subagents/agent-a<name>-<hash>.jsonl Every agent had done the work and answered every message: | Agent | assistant text blocks | content | | --- | --- | --- | | A | 6 | full structured report at 7,898 / 6,554 / 6,839 chars — delivered three times | | B | 5 | full structured report at 5,362 / 5,389 / 5,375 chars — three times | | C | 4 | full structured report at 7,803 / 7,855 / 7,920 chars — three times | Agent B's third message opens: "The verdict was delivered in full in my previous two messages — nothing is unfinished. Repeating it verbatim." Agent C's opens: "third delivery; identical to the prior two." The one-word probe produced a final assistant text block containing exactly READY. So the agents were responding to every inbox message. Only the delivery back to the parent failed. ## What this rules out - Timeout / crash — the agents stayed alive and idle, heartbeating, for 30+ minutes after finishing. - Payload size or serialisation — a 5-character reply (READY) failed identically to an 8KB report. - Prompt quality — the prompts specified a structured verdict with required sections, a word cap, and "return raw findings, not a preamble". - idle_notification delivery — those do reach the parent, so the agent→parent channel is not wholly broken; it is the assistant message specifically that is lost. ## Possibly relevant local configuration The project defines a SubagentStop hook of type: "prompt" (model claude-haiku-4-5-20251001) that can return {"ok":false,...} to block a stop. This was our leading suspect and appears not to be the cause — a blocked stop would show the agent being sent back to work, and the transcripts instead show cleanly completed turns whose text simply never arrived. Flagging it in case the interaction matters. Also present: a SubagentStart hook (async: true) that injects additionalContext. ## Impact Any fan-out workflow silently returns nothing while appearing to succeed. In our repo that includes a security-review coordinator that dispatches six specialists, a full-stack feature coordinator, a wave runner that dispatches one implementer per wave gated on reviewers, and a backlog triage command that dispatches one judge per evidence surface. We measured the cost on one review: the three discarded reports each contained real findings that the single-context redo missed. ## Workaround Read the subagent transcript directly rather than re-running the work: ``bash ls ~/.claude/projects/<project-slug>/<session-id>/subagents/ ` `bash node -e " const fs=require('fs'); const L=fs.readFileSync(process.argv[1],'utf8').trim().split('\n') .map(l=>{try{return JSON.parse(l)}catch(e){return null}}).filter(Boolean); for(const j of L){ if(j.type!=='assistant') continue; for(const b of (j.message&&j.message.content)||[]) if(b.type==='text'&&b.text.trim()) console.log(b.text); } " <transcript.jsonl> `` (The transcripts are ~400KB, so extract rather than reading them whole.)

Environment Info

  • Platform: linux
  • Terminal: vscode
  • Version: 2.1.233
  • Feedback ID: 50a7a959-4baf-4bfd-a62e-3ce14a9cd656

Errors

[]

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗