How to Reduce Claude Token Usage (Claude Code, Chat and API)
Documented ways to cut Claude token usage: /clear and /compact, model and effort choice, a lean CLAUDE.md, subagents, MCP hygiene, and prompt caching on the API.
By Claudekit Team Published 8 min read
The biggest lever on Claude token usage is context: Claude Code sends your whole conversation with every request, so the fastest savings come from keeping that conversation short. In order of impact: /clear between unrelated tasks, pick the smallest model and effort that does the job, keep CLAUDE.md lean, and push noisy work into subagents. On the API, add prompt caching and the Batch API.
Everything here comes from Anthropic’s Claude Code costs guide, the Help Center’s usage limit best practices and the API pricing page, checked October 25, 2026 unless a row says otherwise. Claudekit.ai is an independent community site, not affiliated with Anthropic.
Start by measuring
You can’t cut what you can’t see. On a Pro, Max, Team or Enterprise plan:
- Run
/usagein Claude Code. Below the plan bars it shows what consumed your allowance (skills, subagents, plugins, individual MCP servers) and recommendations such as “Trim CLAUDE.md · 49k tokens per request”. On Claude Code v2.1.305 or later, pressfto have it apply the ones it can. - Run
/contextto see what fills the current context window. - On Pro and Max, put your limits on screen with a status line that shows rate limit usage, so you notice a fast climb while it happens.
For every way to read the numbers, including headless runs and team dashboards, see how to check Claude Code token usage.
The rest of this guide is the list of fixes those screens point to.
Claude Code: the levers that matter
| Lever | What to do | Why it works |
|---|---|---|
| Clear between tasks | /clear when you switch to unrelated work. /rename first so you can /resume later | Stale context is re-sent with every message. /clear costs nothing |
| Compact with a focus | /compact Focus on code changes and test output | Summarises the conversation, keeping what you name. It reads the whole thread to do it, so it is a large request itself |
| Right model | Sonnet for most coding, Opus for hard design. model: haiku for simple subagents | Smaller models use less. Switching to Opus also switches subagents that inherit your model |
| Lower effort | /effort down for simple tasks | Thinking is billed as output and can run to tens of thousands of tokens per request |
| Lean CLAUDE.md | Keep it under about 200 lines. Move procedures into skills | CLAUDE.md loads at session start; skills load only when used |
| Subagents for noisy work | Delegate test runs, log digging and doc fetching to subagents | The verbose output stays in the subagent; only a summary returns. Its requests still count, so give it a small model |
| Fewer MCP servers | Disable unused servers in /mcp. Prefer CLIs like gh where they exist | CLIs add no per-tool listing to the context |
| Filter with hooks | A PreToolUse hook that trims test output to failures | Hundreds of tokens instead of tens of thousands |
| Plan first | Plan mode (Shift+Tab) for big changes; Esc to stop a wrong turn early | Re-work after a wrong direction is the most expensive tokens you spend |
| Specific prompts | “Add input validation to login() in auth.ts”, not “improve this codebase” | Vague requests trigger broad file scanning |
Our Claude Code context window guide goes deeper on /context, /compact and what survives compaction, and the CLAUDE.md guide shows how to keep the file short.
Hidden usage in long sessions
Anthropic’s costs guide lists what makes a session that has been open for hours use more than your activity suggests:
- Cache misses after a break. Your first message after the cache lifetime has passed re-processes the full context. After a long break, a fresh session is often cheaper than picking up a huge one.
- Scheduled tasks. A
/loopor other session-scoped scheduled task fires on its interval, sending your full context each time, even while you are idle. - Agent teams. Each teammate runs its own context window. The docs put agent teams at roughly 7x the tokens of a standard session when teammates run in plan mode. Keep teams small and shut teammates down when they finish.
- Background work. Summaries for
--resumeand similar jobs use a small amount, typically under $0.04 per session per the docs.
Claude chat: make the allowance go further
Based on the Help Center’s tips for claude.ai, the desktop and mobile apps:
- Keep conversations focused. Conversation length is one of the factors that uses your allowance faster, so start a new chat when the topic changes.
- Refer back instead of repeating. On paid plans, chat search and memory let Claude reuse earlier information you would otherwise paste again.
- Batch related questions into one message instead of a string of follow-ups.
- Use Projects for documents you reference repeatedly: cached project content counts less against your limits than new content.
- Be specific so you need fewer follow-up messages.
- Check Settings > Usage to see your session and weekly bars before a big task.
Chat and Claude Code share one allowance, so a long research chat leaves less for coding. The rules are in Claude usage limits explained.
Claude API: pay less per token
On the API you pay for every token, so the same habits save money directly. Two more levers apply:
- Prompt caching. Mark the repeated prefix (system prompt, tool definitions, documents) as cacheable. A cache read costs 0.1x the input price on most current models, and less on some; a cache write costs 1.25x input for 5 minutes or 2x for 1 hour (pricing page, checked October 24, 2026). It pays off when the prefix is reused within its lifetime.
- Batch API. Work that can wait gets 50% off input and output, and caching discounts stack with it.
Run your own numbers in the Claude API cost calculator, and see worked examples in the Claude API pricing guide.
When saving tokens isn’t enough
If you trim everything and still hit limits every week, the issue is capacity, not waste. Compare your usage priced at API rates with Pro, Max and Team in the plan picker, and check the limits changelog for recent changes before you decide.
Frequently asked questions
What uses the most tokens in Claude Code?
Context. Claude Code re-sends the conversation with every request, so a long session makes every message expensive. Large CLAUDE.md files, many MCP servers, subagents and long thinking add to it. Run /usage on a paid plan to see which skills, subagents, plugins and MCP servers used your allowance.
Is /compact or /clear better for saving tokens?
/clear, when you are switching to unrelated work: it starts an empty conversation and costs nothing. /compact keeps you on the same task with a summary, but it reads the whole conversation to write that summary, so it is a large request itself.
Does using Sonnet instead of Opus save usage on a subscription?
Anthropic's docs say model choice affects how fast you use your allowance, and recommend Sonnet for most coding with Opus for complex architecture and multi-step reasoning. On the API, Sonnet 5.5 costs half of Opus 5.5 per token as of October 24, 2026.
How does prompt caching reduce Claude API costs?
A cache read costs a fraction of the normal input price: 0.1x on most current models per Anthropic's pricing page, and less on some. Writing the cache costs 1.25x input for 5 minutes or 2x for 1 hour, so caching pays off when the same prefix is reused within the lifetime.