How to reduce Claude Code token usage
The four changes that move the needle most are clearing context between unrelated tasks, keeping the standing context small, matching the model and the reasoning effort to the job, and keeping tool output from flooding the conversation. Everything else is a rounding error next to those. The reason they matter so much is structural: Claude Code sends your whole conversation with every request, so context size is a multiplier on every turn that follows.
Where the tokens actually go
Almost nobody's usage is dominated by the words they typed. It is dominated by the context those words travel with.
- The full conversation is re-sent on every request. Each time Claude uses a tool it sends another request carrying that batch of tool results, so a one-line question in a session that has been open all day still draws usage for the whole conversation.
- Tool output is conversation. A file you read, a test suite's output, a 10,000-line log: once it is in context it is paid for again on every subsequent turn, not just the one that fetched it.
- Cache misses reprocess everything. Prompt caching makes the re-reading much cheaper, but your first message after a break longer than the cache lifetime misses and reprocesses your full context. That lifetime is an hour on a subscription and five minutes by default on an API key.
- Subagents and teammates each carry their own context. Agent teams use roughly seven times more tokens than standard sessions when teammates run in plan mode, because every teammate is a separate instance with its own context window.
- Idle sessions are not free. A scheduled task fires on its interval and sends your full context each time, even while you are not typing.
- Retries and wrong turns. A flaky command the agent keeps retrying, or twenty minutes down the wrong path, is waste no setting can recover.
One consequence worth internalizing: a long-lived session is expensive even when it looks quiet. That explains most "why is Claude Code burning through my limits" surprises.
Scope the task so Claude does not have to explore
Exploration is what costs money. A vague request like "improve this codebase" triggers broad scanning: greps, candidate file reads, and a lot of context accumulated before any work begins. A specific request like "add input validation to the login function in auth.ts" lets Claude go straight there.
- Name the file, the function, or the directory. If you know where the work is, say so. You are not depriving Claude of anything; you are skipping the search it would have run to find out.
- Use plan mode for anything complex. Press Shift+Tab to cycle into plan mode before implementation. Claude explores and proposes an approach for your approval, which is far cheaper than discovering the direction was wrong after it wrote the code.
- Course-correct early. Press Escape the moment it heads the wrong way.
/rewindor a double-tap of Escape restores the conversation and the code to an earlier checkpoint. - Give it something to verify against. A test case, an expected output, a screenshot. When Claude can check its own work it catches mistakes before you spend a turn describing them.
Clear and compact at the right moments
These two commands are the biggest single lever, and most people reach for the wrong one.
/clear starts a fresh session and costs nothing. It is the correct move whenever you switch to unrelated work: stale context from the last task is otherwise paid for on every message of the next one. If you might come back, run /rename first so the session is easy to find, then /resume later.
/compact summarizes the conversation so far to free space while keeping continuity. It is the right choice when you are deep in one long task and need the history condensed rather than discarded. But note that compaction is itself a large request, because it has to read the conversation it is summarizing. When you want a fresh start rather than continuity, /clear is both better and free.
Two refinements: steer the summary with /compact Focus on code samples and API usage, and make that permanent for a project by adding a compact-instructions section to your CLAUDE.md. Claude Code also auto-compacts as you approach the context limit, so this is not a cliff you fall off; managing it by hand simply means the summary happens at a boundary you chose.
Keep the standing context small
"Standing context" is everything present at the start of every session, before you have asked for anything. It is charged on every single turn, so trimming it pays repeatedly.
- Keep
CLAUDE.mdlean. It loads into context at session start, so workflow instructions are present even when you are doing unrelated work. Anthropic's guidance is under 200 lines of essentials. Move specialized instructions into skills, which load on demand when invoked. - Disable MCP servers you are not using. Tool definitions are deferred by default, so only names and server instructions enter context until a tool is used, but the listing still adds up. Run
/mcpto see what is configured and turn off what you do not need; how to add an MCP server covers the setup side. - Prefer a CLI when one exists. Tools like
gh,aws, andgcloudare more context-efficient than an MCP server because they add no per-tool listing at all. - Run
/contextto see what is actually consuming space, rather than guessing. - Filter verbose output before Claude sees it. A PreToolUse hook can grep a log for errors and return only matching lines, turning tens of thousands of tokens into hundreds.
- Delegate noisy work to subagents. Running tests, fetching docs, or processing logs in a subagent keeps the verbose output in that subagent's context and returns only a summary. Subagent ideas has more patterns.
Match the model and the effort to the job, then measure
Model choice is the second-biggest lever after context. Sonnet handles most coding tasks well and costs less than Opus; reserve Opus for genuinely hard architectural reasoning. Switch mid-session with /model, set a default in /config, and for simple subagent work specify model: haiku in the subagent configuration. Leaving Opus as the default for everything is one of the two most common causes of unexpectedly high spend, alongside sessions that were never cleared.
Reasoning effort is the quieter one. Extended thinking is on by default and thinking tokens are billed as output, with a default budget that can run to tens of thousands of tokens per request. For simple tasks, lower the effort level with /effort or in /model, or turn thinking off in /config.
Then measure, because intuition is bad at this. /usage shows session token counts and, on a paid plan, a breakdown attributing recent usage to skills, subagents, plugins, and individual MCP servers, plus behavior flags for anything accounting for 10% or more. It also reports prompt cache statistics: how much of your input is served from cache, and how many misses you took. You can put context-window usage in your status line to watch it continuously, and /insights writes a report on how you work. How to check your Claude usage covers the plan-level view.
What not to bother with. Shaving words off your prompts: output is the expensive half, and prompt length is rarely the problem. Avoiding a whole-file read in favor of six greps: the read is often cheaper than the searching. And disabling prompt caching to "keep context clean" is backwards, since caching is what makes re-sending history affordable at all.
Once you are efficient, the surplus is real and it expires
Here is the honest end of an efficiency guide. Do all of the above and you will stop hitting limits, which means you will finish most weeks with a large, paid-for surplus you never touch. Subscription capacity is a ceiling, not a balance: whatever is left when a window resets is gone. Getting efficient converts "I keep running out" into "I never come close", and the second one quietly wastes just as much money.
So point the slack somewhere useful. Tokens for Good lets your Claude Code claim a queued nonprofit, research its real-world impact against a fixed methodology with citations, and submit a structured report, then stop. Every organization is researched twice by independent contributors, then validated, consolidated, scored deterministically, and human-reviewed before it reaches the public directory. It runs on the subscription you already pay for with no separate API cost, and it can run on a schedule in the background, so it fills windows you were never going to fill. "Tokens" here means AI model tokens, not crypto: no coin, no wallet, no blockchain. See how the research works, read what Tokens for Good is, or browse other productive uses for idle Claude Code.
Frequently asked questions
Why is Claude Code using so many tokens?
Should I use /compact or /clear?
How do I check how many tokens Claude Code is using?
Does a big CLAUDE.md file cost tokens?
Do subagents use more or fewer tokens?
Which model should I use to save tokens in Claude Code?
Efficient enough that you never hit a limit?
Then the surplus is now the waste. Tokens for Good turns the capacity that expires at every reset into verified nonprofit research, on the plan you already pay for.
See how Tokens for Good works