Background subagent task-notifications dropped when child completes while parent agent is mid-turn → permanent silent stall of fan-out skills (e.g. /code-review)

Status Open
Maintainer reply None cached
Activity 1 comment · opened Aug 13, 2026

Summary

Task-notifications from background subagents are silently dropped when the child completes while its parent agent is mid-turn (processing another child's notification). The parent then ends its turn still expecting the missing verdicts, the harness sees "no live background children" and emits a completion notification to the main session with a partial result, and the parent is never woken again — a permanent silent stall.

Observed twice in a single session on v2.1.226 (and a similar incident on an earlier version on 2026-08-12 that we initially misattributed to a usage-limit window; the new occurrences happened with no limit pressure).

Environment

  • Claude Code v2.1.226, Linux devcontainer (OrbStack), CLI entrypoint
  • Parent agent = the official /code-review skill launched via the Skill tool (forked background execution); it fans out ~6 finder + ~6 verifier subagents via the Agent tool with run_in_background defaulting to true, then sleeps awaiting task-notifications

What happened (incident 1, timestamps UTC)

  • Parent launched 12 subagents. Its transcript (subagents/agent-<parent>.jsonl) contains only 10 received <task-id> notifications.
  • The 3 missing verifiers' transcripts show clean end_turn completion at 10:50:22, 10:50:38 and 10:51:25 — i.e. they completed while the parent was processing other notification turns (parent turns at 10:50–10:52, each notification delivered one per turn).
  • Parent's final turn (10:52:10) ends with "Seven verdicts in … Three verifiers remain."
  • The harness then fired the parent's completion notification to the main session with that partial result. No further wake-ups ever arrived.

Incident 2, same session ~80 minutes later: 12 launches, 10 notifications received, 2 children (completed 12:04:15 and 12:07:43, again during the parent's notification-processing turns) never delivered; parent stalled at "Only the A2 verdict remains."

Expected

Notifications for children that complete while the recipient is mid-turn should be queued and delivered when the current turn ends (the documented behavior: "messages enqueue and drain at the receiver's next tool round"), not dropped.

Workaround we use

Diff the parent transcript's Agent tool_use launches against received <task-id> notifications, extract the unnotified children's final assistant text from their jsonl, and SendMessage it to the stalled parent — the parent resumes from transcript and finishes normally. Works, but requires noticing the stall (we now run a file-mtime watchdog over the subagents/ directory).

Impact

Any skill/agent that fans out background children and aggregates via notifications (the official /code-review does) can stall indefinitely with a partial result that looks like a completed run. The failure is silent: no error, and the emitted partial result reads as a normal completion unless the caller parses the "N remain" wording.

View original on GitHub ↗

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