Feature request: defer built-in tool schemas in subagent spawns (measured ~22k of the ~27k spawn context floor)
Problem
Subagent spawns (Agent tool and headless claude -p) load full schemas for all built-in tools regardless of whether the job can use them. Measured on Windows, CC v2.1.x, July 2026, identical trivial prompt (Reply with exactly: OK, claude-haiku-4-5):
| Configuration | Starting context (input+cache tokens) |
|---|---|
| claude -p default | 27,403 |
| claude -p --tools Read,Glob,Grep | 7,873 |
| claude -p --tools none | 5,236 |
| custom agent, tools: [] frontmatter | 1,965 |
| Agent tool, general-purpose | 18,967 (total for the probe) |
| Agent tool, restricted read-only agent | 12,855 |
Tool schemas account for roughly ~22k of the ~27.4k default headless floor. MCP tool schemas are already deferred by default (Tool Search) — built-ins still ride along on every spawn.
Many delegated jobs (judging/scoring, summarizing, classifying, extraction from provided text) never call a tool; each such spawn pays ~15-25k tokens of pure schema tax. In a session with ~10 spawns this is 150-250k tokens of context that could be name-only stubs.
Request
Extend the deferred-tools mechanism to built-in tool schemas in subagent spawns: name-only stubs + on-demand schema fetch (as already works for MCP tools and for several built-ins in main-loop sessions). Alternatively: honor a lightweight "text-only" spawn mode on the Agent tool.
Workaround we ship today
Preset restricted agents (tools: [] / read-only) — works well (verified the frontmatter is honored: a tools: [] agent self-reports NO TOOLS; a tools: [Glob, Grep, Read] agent reports exactly those three). Two artifacts observed while testing, worth a look:
- The Agent tool's registry listing displays a
tools: []agent as "(Tools: All tools)" — display artifact; the spawn itself is correctly tool-less. - In headless
-pruns with--max-turns 1, models offered the full toolbox on a text-shaped task sometimes attempt a tool call and die onerror_max_turns— schema deferral would reduce this failure mode too.
Raw measurement JSONs: https://github.com/tomacco/aura-distill/tree/main/research/2026-07-09-token-saver
🤖 Generated with Claude Code