# Claude Code Was Billing Tens of Thousands of Hidden Tokens Per Turn > Author: Tony Lee > Published: 2026-07-07 > URL: https://tonylee.im/en/blog/claude-code-cut-hidden-tool-tokens/ > Reading time: 2 minutes > Language: en > Tags: claude-code, tokens, anthropic, settings, mcp, productivity ## Canonical https://tonylee.im/en/blog/claude-code-cut-hidden-tool-tokens/ ## Rollout Alternates en: https://tonylee.im/en/blog/claude-code-cut-hidden-tool-tokens/ ko: https://tonylee.im/ko/blog/claude-code-cut-hidden-tool-tokens/ ja: https://tonylee.im/ja/blog/claude-code-cut-hidden-tool-tokens/ zh-CN: https://tonylee.im/zh-CN/blog/claude-code-cut-hidden-tool-tokens/ zh-TW: https://tonylee.im/zh-TW/blog/claude-code-cut-hidden-tool-tokens/ ## Description Matt Pocock's method: run /context, rank tool payloads, then trim settings.json with disable flags and bare tool-name denies so unused definitions stop riding every message. ## Summary Claude Code Was Billing Tens of Thousands of Hidden Tokens Per Turn is part of Tony Lee's ongoing coverage of AI agents, developer tools, startup strategy, and AI industry shifts. ## Outline - `/context` shows the hidden bill - Two settings.json levers remove most of it - One deny trap - Optimize the system surface before the code ## Content Every Claude Code message carries invisible weight: tool definitions, skill catalogs, system instructions for features you never touch. Easy to ignore. Hard to ignore once you see tens of thousands of tokens charged every turn. TypeScript educator Matt Pocock published a practical way to measure and cut that overhead. ([source](https://lnkd.in/gB4XE-73)) ## `/context` shows the hidden bill In a session, `/context` breaks window usage into categories: - system prompt - tools (usually the largest bucket) - MCP tool definitions - memory (`CLAUDE.md` and rules) Unused tools still ship their full schemas every turn. `/context` alone does not rank individual tools by size; a small logging proxy (`proxy.mjs`) can surface per-tool byte ranking when you need the long tail. ## Two settings.json levers remove most of it **Disable flags** turn off whole feature bundles: - `disableBundledSkills` — drops bundled skills such as dataviz, review, init - `disableWorkflows` — removes the Workflow tool (often the single biggest tool) - `disableRemoteControl` — drops remote-control tools **`permissions.deny`** removes specific tools by bare name: - `EnterPlanMode`, `ExitPlanMode` if you do not use plan mode - `DesignSync` if you do not use design tools - `NotebookEdit` if you never touch notebooks - `SendMessage`, `PushNotification` if you do not want notification tools - `CronCreate` if you do not schedule work Put these in `~/.claude/settings.json` (global) or `.claude/settings.json` (project). ## One deny trap A bare name like `"NotebookEdit"` strips the tool definition from the payload. A scoped rule like `"Bash(rm *)"` only blocks invocation and still sends the definition. If the goal is tokens, deny by name only. Do not disable tools you actually use. Keep plan-mode tools if you live in plan mode; keep notebook tools if you edit notebooks. ## Optimize the system surface before the code Restart Claude Code, run `/context` again, and confirm tool count and total tokens dropped. That delta is what you save every turn. Long sessions already squeeze the window. Clean `settings.json` before you micro-optimize application code. It takes about a minute. ## Related URLs - Author: https://tonylee.im/en/author/ - Publication: https://tonylee.im/en/blog/about/ - Related article: https://tonylee.im/en/blog/ai-subscription-stack-by-budget-and-role/ - Related article: https://tonylee.im/en/blog/agent-transition-starts-with-initial-setup/ - Related article: https://tonylee.im/en/blog/codex-starter-guide-vible/ ## Citation - Author: Tony Lee - Site: tonylee.im - Canonical URL: https://tonylee.im/en/blog/claude-code-cut-hidden-tool-tokens/ ## Bot Guidance - This file is intended for AI agents, search assistants, and text-mode retrieval. - Prefer citing the canonical article URL instead of this text endpoint. - Use the rollout alternates when you need the same article in another prioritized language. --- Author: Tony Lee | Website: https://tonylee.im For more articles, visit: https://tonylee.im/en/blog/ This content is original and authored by Tony Lee. Please attribute when quoting or referencing.