Spend less without getting worse results
Cut Claude Code usage by keeping the prompt cache warm, changing effort instead of models, and clearing context at the right moments.
If you hit your plan limits early, or your API bill surprises you, the fix is rarely a cheaper model. It is usually how the session is run. This guide is for regular Claude Code users who want the same quality for less. You will learn how to read your usage, keep the prompt cache working for you, and drop the habits that quietly burn tokens.
What you will have at the end
- A habit of checking
/usageand knowing what the numbers mean. - A session routine that keeps the prompt cache warm.
- A rule for when to change effort and when to change model.
- A leaner base context: shorter CLAUDE.md, fewer idle MCP servers, noisy work moved out.
Before you start
- Claude Code installed and signed in.
- A project you work in most days, so the changes have something to act on.
- Run
claude --version. Cost reporting changes between releases (costs page).
Step 1: see where your tokens go
Run this in a session:
/usageThe Session block at the top shows token use for the current session (costs page). On a Pro, Max, Ultra, Team or Enterprise plan, the screen also shows plan usage bars and a breakdown. That breakdown recommends a change for any behaviour behind 10% or more of your recent usage (why usage climbs). Start there: it tells you which of the steps below matters most for you.
Two things to understand before going further:
- Claude Code sends your whole conversation with every request. A one-line question late in a long session still pays for everything above it (why usage climbs).
- Prompt caching softens that. Repeated content is read from the cache at a lower rate than fresh input (prompt caching).
So the two levers are: send less context, and keep the cache hitting.
Step 2: keep the cache warm
The cache is your biggest silent saving, and some ordinary actions break it. After a miss you get one slower, more expensive turn, then the new prefix is cached again (prompt caching).
The main cache breakers:
- Switching models. Each model has its own cache, so the next request rereads the whole conversation with no cache hits (switching models).
- Long breaks. Cached content expires after a period of inactivity. On a Claude subscription within plan usage, the main conversation gets a one-hour cache by default. With usage credits, an API key or a cloud provider, it gets five minutes (cache lifetime).
- Changing tools mid-session, such as connecting an MCP server or enabling a plugin, can also cause misses (prompt caching).
The docs give a simple routine: "Pick your model and effort level at the top of a session, then save /compact for natural breaks between tasks." (prompt caching)
To see whether it works, look at /usage again. After the first response, the Session block has a Prompt cache (main) line with your hit ratio, miss count and whether the cache is warm. It needs Claude Code v2.1.251 or later (check cache performance).
Step 3: change effort, not models
Effort controls how much the model reasons on each step. Lower effort is faster and cheaper for simple tasks, higher effort helps on hard problems (model config). Change it with:
/effortHere is why effort is the better dial mid-task. On Opus 5.5, Sonnet 5.5, Haiku 5.5 and Fable 5.1, with an API key or a Claude subscription, changing effort keeps the cache (changing effort level). Switching model with /model does not. On Amazon Bedrock, Google Cloud's Agent Platform or a Claude apps gateway, an effort change also misses the cache, so pick it at the start there.
Opus 5.5, Sonnet 5.5 and Haiku 5.5 start at medium effort unless you set something else (model config). For routine edits, try low. Raise it when Claude starts missing things, not before.
If you do want a cheaper model, choose it at the start of the session. The docs suggest Sonnet for most coding and Opus for complex architecture or multi-step reasoning (choose the right model).
Step 4: clear and compact at the right moments
Two commands, two jobs (manage context):
/clearUse it when you switch to unrelated work. Stale context costs tokens on every later message, and /clear itself costs nothing (why usage climbs). Run /rename first if you might want to come back with /resume.
/compact Focus on code samples and API usageUse it at a natural break when you want to keep going on the same work with a shorter history. The text after /compact tells Claude what to keep. Compaction is itself a request that reads the conversation, so it is cheapest while the cache is warm and most expensive on an old session you just resumed (compacting).
If you went down a wrong path, /rewind back to an earlier turn instead. Rewinding returns to a prefix that is already cached (compacting).
Step 5: shrink what loads every turn
Some context is paid on every single message. Trim it once and you save all session.
- CLAUDE.md. It loads at session start. Move workflow-specific instructions, like PR review steps, into skills, which load only when used. Aim for under 200 lines (costs page).
- MCP servers. Run
/contextto see what takes space and/mcpto disable servers you are not using. Where a CLI exists, such asgh, it is still more context efficient than an MCP server (reduce MCP overhead). - Noisy output. Hand test runs and log reading to a subagent so only the summary returns, or use a hook to filter test output to failures (costs page).
- Vague prompts. "Improve this codebase" makes Claude scan widely. Naming the function and file lets it read less (write specific prompts).
Check it worked
Work a normal day with the routine above, then run /usage:
- The
Prompt cache (main)line should show a high hit ratio. If misses keep climbing, the line can name a likely cause, such aslikely cause: tool definitions changed(check cache performance). - On a plan, the breakdown should no longer flag the behaviour it flagged in Step 1.
/contextshould show a smaller fixed load than before.
Common problems
The first message after lunch is slow and expensive. The cache expired. That is expected after a long break. Finish a thought before stepping away, or start fresh with /clear if the old context is no longer needed.
Usage climbs while the session sits idle. Several features start turns on their own: session-scoped scheduled tasks, goal check-ins, messages from other sessions (why usage climbs), and idle compaction (background usage). Close sessions you are done with.
Subagents eat more than expected. Each one sends its own requests. Give simple ones model: haiku in their definition (choose the right model).
Plan mode with opusplan breaks the cache. The opusplan setting uses Opus in plan mode and Sonnet otherwise, so every toggle is a model switch and a fresh cache (switching models).
Agent teams burn through the budget. Teams use about 7x the tokens of a standard session when teammates run in plan mode (agent team costs). Keep team tasks small.
Next
- Pick the right model and effort for each task: the model and effort choices in more depth.
- The token budget masterclass: settings, hooks and a tracking sheet for serious budgets.
Sources
Last checked: 2026-11-06