Sub-agents return "0 tool uses / Done" when parent session has deferred tool schemas
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,NotebookEditall deferred) - Parent tools that were eager:
Bash,Read,Edit,Write,Glob,Grep,Agent,AskUserQuestion,Skill,ToolSearch
Repro pattern
- Start a Claude Code session where core tools like
Read,Grep,Globare deferred for sub-agents (large MCP inventory tends to trigger this). - In plan mode, ask Claude to investigate something that would naturally fan out into multiple
Exploreorgeneral-purposesub-agents (e.g., "investigate three unrelated bugs in parallel"). - 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 likeExploreare tuned for search, not for hydrating deferred schemas), or - The sub-agent's context doesn't inherit the
<system-reminder>that lists deferred tools + theToolSearchinstructions.
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:
- 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
- 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-purposeover 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.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗