Sub-agents return "0 tool uses / Done" when parent session has deferred tool schemas

Open 💬 1 comment Opened Jul 6, 2026 by prahaladvathsan

Summary

When a parent Claude Code session is running with deferred tool schemas (the ToolSearch-fetched-on-demand mechanism), sub-agents spawned via the Agent tool return immediately with zero tool uses and a "Done" message, without attempting any work. Plan mode is effectively unusable in these sessions because it relies heavily on sub-agent delegation.

Environment

  • Claude Code CLI on Windows 11 (win32)
  • Model: Opus 4.7 (1M context) — claude-opus-4-7[1m]
  • Session had a large deferred-tools inventory (~80 MCP servers + core tools like TaskCreate, EnterPlanMode, ExitPlanMode, WebFetch, WebSearch, NotebookEdit all deferred)
  • Parent tools that were eager: Bash, Read, Edit, Write, Glob, Grep, Agent, AskUserQuestion, Skill, ToolSearch

Repro pattern

  1. Start a Claude Code session where core tools like Read, Grep, Glob are deferred for sub-agents (large MCP inventory tends to trigger this).
  2. In plan mode, ask Claude to investigate something that would naturally fan out into multiple Explore or general-purpose sub-agents (e.g., "investigate three unrelated bugs in parallel").
  3. Parent spawns 2–3 sub-agents in a single message.

Observed

All sub-agents return with the same signature:

● 3 Explore agents finished (ctrl+o to expand)
   ├ Investigate headless auction path · 0 tool uses
   │ ⎿  Done
   ├ Investigate calendar/league scheduling · 0 tool uses
   │ ⎿  Done
   └ Investigate double-foreign contract bug · 0 tool uses
     ⎿  Done

● Agent spawns failed due to unrelated tool metadata. Let me investigate directly.

The parent's diagnostic — "unrelated tool metadata" — points at the tool-schema layer, not at the prompt or task.

Suspected cause

Sub-agents inherit a tool inventory where the tools they need (Read/Grep/Glob) are in deferred state, but either:

  • The sub-agent's system prompt doesn't explain the ToolSearch-first workflow (specialized agents like Explore are tuned for search, not for hydrating deferred schemas), or
  • The sub-agent's context doesn't inherit the <system-reminder> that lists deferred tools + the ToolSearch instructions.

Either way, the sub-agent looks at its inventory, sees no callable tools, and returns "Done" without attempting anything. It does not error — it exits cleanly, which is why the failure is silent.

Expected

One of:

  1. Sub-agents eagerly hydrate the schemas for their declared tool set before the sub-agent starts, so deferred-state never leaks into a sub-agent, OR
  2. Sub-agent system prompts consistently include the ToolSearch-first workflow explanation and receive the deferred-tools <system-reminder> from the parent.

Impact

  • Plan mode is unreliable in sessions with heavy MCP inventory — the very sessions where planning matters most.
  • Failure is silent: sub-agents report "Done" with no error, so the parent has to detect the "0 tool uses" pattern to know delegation failed.
  • Users without MCP load rarely hit this, so it looks intermittent / unreproducible from outside.

Workarounds users are landing on

  • Explicitly instruct the parent "don't spawn sub-agents, investigate directly."
  • Prefer general-purpose over specialized agents (Explore, Plan) — anecdotally hits the bug less.
  • Skip plan mode entirely in MCP-heavy sessions.

None of these are great — the point of plan mode is that the harness handles delegation.

View original on GitHub ↗

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