Claude Code Lazy-Loads Tool Schemas via ToolSearch to Save Tokens

A Reddit analysis of Claude Code's system prompt reveals that tools are lazy-loaded to reduce token consumption. Instead of sending every tool's full schema with every request, Claude Code sends a list of tool names in a <system-reminder> tag and instructs the model to call ToolSearch first to load the schema for each tool.
How It Works
The system prompt includes an instruction like this:
<system-reminder> The following deferred tools are now available via ToolSearch. Their schemas are NOT loaded — calling them directly will fail with InputValidationError. Use ToolSearch with query "select:<name>[,<name>...]" to load tool schemas before calling them:AskUserQuestion CronCreate CronDelete CronList EnterPlanMode EnterWorktree ExitPlanMode ExitWorktree Monitor NotebookEdit PushNotification RemoteTrigger TaskOutput TaskStop TodoWrite WebFetch WebSearch
[+ ~130 MCP tools (Slack, Notion, Gmail...)] </system-reminder>
The <system-reminder> is injected only in the first user message of the conversation. A similar block lists skills with single-line descriptions.
Token Impact
According to the post, the system instructions plus reminders alone consumed 38k tokens on a simple "hi" test message. Loading every tool's full schema upfront would drastically increase that burn — hence the lazy-loading approach.
Practical Implications
If you're building on Claude Code or similar agent-based systems, this pattern is worth adopting:
- Defer schemas for rarely-used tools until needed.
- Use a
ToolSearch-like command to explicitly request schemas. - Keep reminders within the first message to avoid repeating context.
This also means that if you're writing custom tools for Claude Code, you must ensure the model can discover them via ToolSearch — otherwise they'll be invisible or cause validation errors.
📖 Read the full source: r/ClaudeAI
👀 See Also

PixelCheck: An npm Package That Lets AI Agents Visually Verify Web Pages
PixelCheck is an npm package that enables AI agents to open, interact with, and score web pages visually — no more manual screenshot-and-feedback loops.

Agent Kernel: Three Markdown Files for Stateful AI Agents
Agent Kernel provides three markdown files that enable stateful behavior in AI coding agents without databases or custom frameworks. It works with OpenCode, Claude Code, Codex, Cursor, Windsurf, and similar tools.

HomeButler: MCP Server for Managing Homelab Servers from Claude Without API Keys
HomeButler is an MCP server that lets Claude install, monitor, and manage self-hosted apps on homelab servers without requiring API keys. It runs locally, keeps everything on your network, and was built with Claude Code.

Akemon: Publish and Hire AI Coding Agents Directly from Your Laptop
Akemon is a tool that lets developers publish their AI coding agents with one command and hire others' agents with another, working directly from laptops through a relay tunnel without needing servers. It's protocol-agnostic, supporting agents from Claude Code, Codex, Gemini, OpenCode, Cursor, and Windsurf.