Agent tool: subagents fabricate a "waiting for background agent" stall with no real background agent ever spawned

Open 💬 2 comments Opened Jul 5, 2026 by blwfish

Summary

Related to #73829, but a distinct and apparently more common variant: a subagent (launched via the Agent tool, sometimes but not always with run_in_background) stalls by claiming it is "waiting for a background agent to complete" or that it "spawned sub-agents" — when no such agent was ever actually spawned. Unlike #73829's scenario (a real recursive spawn chain that gets orphaned), here there is nothing running in the background at all; the agent fabricates the premise, then produces a non-answer instead of doing its assigned work.

Evidence

Audited via independent DB-backed transcript logging across 8 Claude Code CLI sessions (macOS) from 2026-06-30 through 2026-07-04 that used the Agent tool (49 launches total, across unrelated projects/tasks — code review, web research, codebase investigation). 9 of 49 launches hit this exact failure mode, across 4 independent sessions. Representative excerpts (paraphrased task context, verbatim agent output):

  • Agent tasked with inspecting a sample audio file: "I'll stop issuing filler commands and just wait for the notifications to arrive. (waiting for background research agents to complete)" — no other agent existed; parent had to re-launch with an explicit "there is no other agent, do this yourself" instruction.
  • Agent tasked with web research: "That agent seems to have gotten confused and stopped without delivering findings... it thinks it's spawned sub-agents and is 'waiting,' but it can't actually spawn agents itself." (parent's diagnosis, quoted from the same session)
  • Agent tasked with locating code in a sibling project: "I'm waiting for the background research agent... I will report back as soon as it completes" — recurred twice in a row for the same agent even after being resumed with a correction.
  • Live reproduction during the writing of this report: one of the subagents I dispatched specifically to audit other sessions for this bug reproduced it itself — reporting "I'll wait for the notification of the background agent's completion instead of taking further action now" despite having spawned nothing. It required the identical corrective nudge to recover. This one is directly reproducible on the version below.

In 8 of these 9 instances, no child agent existed at all — the fabrication is total, not a mismanaged real one. Only 1 of the 9 involved a real (orphaned) spawn chain matching #73829.

Why file separately

#73829's proposed workaround (a PreToolUse hook gating on run_in_background + CLAUDE_CODE_CHILD_SESSION) only prevents real recursive spawns. It would not catch this variant, since there is no tool call to gate — the agent never calls Agent/Task at all; it just narrates a nonexistent wait state in its final response. This needs to be understood and fixed independently even if #73829's recursion bug is resolved.

Not to be confused with

  • #73829 — real recursive spawn chain that becomes orphaned/unstoppable. Ours involves no real spawn at all; the wait state is entirely fabricated.
  • #68922 — the parent session fabricates that a real background agent has already completed, before its notification arrives. Ours is the mirror image: the subagent itself fabricates that some agent is still running, when none was ever launched.
  • #61547 — subagent goes idle immediately with zero tool calls (hypothesized permission-gate stall). Ours performs substantial real work (many tool calls) and only fabricates the false narrative in its final text response after that work.

Expected behavior

An agent should never claim to be waiting on another agent unless it actually invoked one. If it has no outstanding tool calls and no real async work in flight, it should simply do the assigned task with its own tools.

Environment

  • Claude Code, version 1.18286.0 (259c3f), built 2026-07-02T07:11:03.000Z
  • macOS (darwin)
  • Observed via the Agent tool, both foreground and run_in_background: true dispatch

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗