Claude Code Desktop Loads Its Tools Upfront, ~13k Tokens a Session#
Published by Alex Sorokoletov
In the desktop app's Code tab, Claude Code sends the full schemas of its own bundled tools, the browser, the iOS simulator, the visualize tools and the plugin and skill suggestion tools, on every request, while tool search defers the tools from other MCP servers. None of the bundled tools sits behind tool search, so each session pays for them whether or not it calls them. A mod's tool.describe hook that returns isDeferred: true moves the ones you never use behind tool search and keeps them out of the prompt until the model searches for one.
What loads and what it costs#
Tool search keeps most tool schemas out of the prompt: each deferred tool contributes only its name until the model searches for it and pulls the schema in. The desktop app's own tools are declared in full instead, so their whole schemas sit in context before you type.
An issue measured a desktop session on Claude Code 2.1.325, macOS. An empty session started at about 82,863 tokens, roughly 40,000 of them tool schemas:
| Tool group | Reported tokens |
|---|---|
Artifact (tracked in #102898) | ~11,000 |
mcp__Claude_Browser__*, 19 tools | ~7,200 |
mcp__Claude_Code_iOS_Simulator__control | ~2,900, plus a ~700 system prompt section |
SuggestPluginInstall, SearchPlugins, SuggestSkills | ~1,800 |
mcp__visualize__* | ~1,300 |
Set the Artifact tool aside, since one deny rule already removes it, and the rest come to about 13k tokens before the first message. On the machine in the report, the simulator, visualize and suggestion tools were called in 2 of 528 sessions.
Why tool search does not already defer them#
Tool search is Claude Code's mechanism for deferring tool schemas: supported endpoints receive the tool-search-tool-2025-10-19 beta, tools arrive as deferred definitions, and the model pulls a schema in with a search when it needs one. It is on by default on the Claude API, and behind a custom ANTHROPIC_BASE_URL since v2.1.304. ENABLE_TOOL_SEARCH turns it auto, true, false, or force.
Turning ENABLE_TOOL_SEARCH up does not defer the bundled tools, because they are not routed through tool search in the first place. They are declared in full by the app, the same way the built-in Read, Edit and Bash tools are, and the core tools cannot be deferred at all. So the fix is to mark the bundled tools you do not need as deferred yourself.
Measure it with /context#
Run /context at the start of a session, before you send a message, and read the System tools and MCP tools lines. Note the numbers, apply the mod below, start a new session, and run /context again. Schema sizes change between releases, so measure on your own version rather than trusting a fixed figure.
Defer the tools with a mod#
A mod's tool.describe hook runs as Claude Code builds each tool's entry. Returning isDeferred: true from it moves that tool behind tool search, so its schema stays out of the prompt until the model searches for the tool by name. Claude Code added the isDeferred control for mods in v2.1.293.
List the tools you never call. In a function-hooks mod, register one hook per tool:
// defer the desktop app's own tools that most sessions never call
on("tool.describe", { tool: "mcp__Claude_Browser__*" }, () => ({ isDeferred: true }))
on("tool.describe", { tool: "mcp__visualize__*" }, () => ({ isDeferred: true }))
on("tool.describe", { tool: "mcp__Claude_Code_iOS_Simulator__control" }, () => ({ isDeferred: true }))
on("tool.describe", { tool: "SuggestPluginInstall" }, () => ({ isDeferred: true }))
on("tool.describe", { tool: "SearchPlugins" }, () => ({ isDeferred: true }))
on("tool.describe", { tool: "SuggestSkills" }, () => ({ isDeferred: true }))
The matcher takes a tool name or an mcp__server__* pattern, the way a permission rule matches MCP tools, so one mcp__Claude_Browser__* line covers all 19 browser tools. Start a new session after you add the mod, and run /context to confirm the System and MCP tools lines dropped. The tools are still available: when the model needs one, a tool search pulls its schema in for that turn.
Or remove a tool you never want#
If a tool is one you never want the model to call, deny it instead of deferring it. A deny rule keeps the tool out of the tool list entirely, so its schema never loads:
{
"permissions": {
"deny": ["mcp__visualize__*", "mcp__Claude_Code_iOS_Simulator__control"]
}
}
Put this in ~/.claude/settings.json for every project, or in a project's .claude/settings.json. --disallowedTools does the same for one session. Check the result with /context: a deferred tool still shows its name, a denied tool is gone. Deny when you want the tool off; defer when you want to keep it available but cheap.
Timeline#
| Version | Published | Change |
|---|---|---|
| v2.1.293 | Oct 7, 2026 | isDeferred added to a mod's tool registration: control whether a tool's schema loads upfront or waits behind tool search |
| v2.1.304 | Oct 19, 2026 | Tool search on by default behind a custom ANTHROPIC_BASE_URL |
| v2.1.325 | Nov 13, 2026 | Version the upfront-loading report measured in the desktop app |
Should you defer every bundled tool?#
Defer the ones a project never calls. If you use the browser tools in a session, leave them loaded there, since deferring adds a search round-trip the first time the model reaches for one. The win is largest when the schemas are big and the calls are rare, which is the case for the browser, simulator, visualize and suggestion tools in a plain coding session. Keep a separate mod, or a project settings file, for the repositories where you do use them.
FAQ#
Why does an empty Claude Code session already use 40k tokens of tools? In the desktop app's Code tab, the bundled tools, the browser, the iOS simulator, the visualize tools, the plugin and skill suggestions, and the Artifact tool, are declared with full schemas instead of being deferred behind tool search. Defer the ones you do not use with a mod's tool.describe hook, and deny the ones you never want.
Does ENABLE_TOOL_SEARCH remove these tools from context? No. Tool search defers tools from other MCP servers, but the desktop app's own tools are not routed through it, so turning ENABLE_TOOL_SEARCH up does not defer them. Mark them deferred with a tool.describe hook returning isDeferred: true.
What is the difference between deferring and denying a tool? Deferring keeps the tool available but holds its schema out of the prompt until the model searches for it; its name still shows in /context. Denying removes the tool from the list so it cannot be called and its schema never loads.
Can I defer Read, Edit or Bash to save tokens? No. The core built-in tools cannot be deferred. Defer the large, rarely used tools instead, and deny what you do not want.
Sources: [1] Claude Code changelog, v2.1.293 | [2] Claude Code changelog, v2.1.304 | [3] Desktop app tools load upfront despite tool search
Related: Turn off the Artifact tool | Context Window Management Guide | ENABLE_TOOL_SEARCH in the env-var glossary | Claude Code v2.1.293 analysis