Claude Code token usage
Claude Code token usage, explained
Claude Code can spend far more tokens than the same task in a chat window, and the bill surprises teams the first time they see it. Here is a plain-English account of what a token is, the four token types on your bill, why an agent burns so many of them, and which of that spend is waste you can cut without slowing anyone down.
The unit
What a token is, and what Claude Code counts
A token is a chunk of text the model reads or writes, roughly four characters of English, or about three-quarters of a word. Every model call is priced in tokens: the ones going in, and the ones coming out.
The part that trips teams up is what counts as "going in." It is not just your prompt. It is your prompt plus every file, tool result, and earlier turn currently loaded into the context window. The model has no memory between calls, so that whole context is re-sent, and re-billed as input, on every turn unless it is cached. Hold that idea, because it is where most of a Claude Code bill comes from.
The four token types
The four kinds of token on a Claude Code bill
Four line items, not one. Reading a bill is much easier once you can tell them apart, because two of them are the expensive default and two of them are the cheaper path.
| Token type | What it is | How it is priced |
|---|---|---|
| Input tokens | Everything you send the model: your prompt plus every file, tool result, and prior turn in the context window. | The base rate, set per model. |
| Output tokens | Everything the model writes back: code, edits, explanations, and tool calls. | Priced higher than input, model by model. |
| Cache write | The first time a stable chunk of context (system prompt, a large file) is stored so later turns can reuse it. | About 25% more than base input, once. |
| Cache read | Every later turn that reuses that stored chunk instead of re-sending it as fresh input. | About 10% of the base input price. |
The two cache multipliers are Anthropic's own: a cache write costs about 25% more than base input once, and every later cache read costs about 10% of base input. That gap is the single biggest lever on this page.
Why the number is high
Why Claude Code burns far more than a chat message
The Claude chat app sends one message and returns one answer. Claude Code is an agent: to finish a single task it plans, reads files into context, edits them, runs commands, reads the results, and corrects itself. That can be eight to fifteen model calls for one request, and each call carries the context that has piled up so far.
This is the context-window tax. Turn one might send a few thousand tokens. By turn ten the model is re-reading everything it has loaded and written since, so each turn is more expensive than the last, even though you only asked once. The same model that feels cheap in chat feels expensive in an agent, because the agent re-bills its whole working memory on every step.
The context-window tax
Most of a Claude Code bill is context re-billed every turn. Caching is where it gets cheap.
Codelitics finds the sessions paying full input rate for context that should be cached, and shows the move. We install on one repo.
Bringing it down
The token spend you can cut without doing less
Not all of that spend is necessary. The bill divides into work that had to happen and defaults that cost more than they needed to, and the second part is where the savings live:
- Model choice. Routine turns sent to a premium model when a cheaper one would have produced the same edit. Premium tiers cost several times the mid tier.
- Caching. Stable context paying the full input rate every turn instead of the cache-read rate. Prompt caching can cut that cost by up to 90%.
- Context hygiene. A bloated CLAUDE.md or too many files loaded means more input tokens on every single turn. Tighter context files pay back on all of them.
- Right tool for the turn. A one-line change driven through a full agentic loop when autocomplete or a single call would have done it.
Claude Code already does some of this for you: it caches repeated content and auto-compacts long conversations automatically. The gap is knowing where your own sessions still pay full price, which model each turn actually needed, and which context files are heavy. That is per-team, and it is what a measurement layer is for.
Same work, fewer tokens
See exactly which Claude Code turns overspent, and the cheaper default that fixes them.
Ranked, costed moves across model choice, caching, and context, from the telemetry Claude Code already produces.
Claude Code token FAQ
Questions teams ask about Claude Code token usage
- Why is Claude Code using so many tokens?
- Because it is agentic, not a chat box. To answer one request it reads whole files into context, calls tools, and runs several model turns, and it re-sends the accumulated context on each of those turns. So a single task can spend many multiples of the tokens a one-shot chat message would. That is expected behaviour, not a bug, and most of it is tunable with cheaper defaults rather than by doing less work.
- How are tokens counted in Claude Code?
- A token is roughly four characters of English, or about three-quarters of a word. Claude Code counts input tokens (your prompt plus all the context it loads), output tokens (everything the model writes), and two cache token types. Input and output are billed every turn; the context you have loaded is re-billed as input each turn unless it is cached.
- Why does Claude Code use more tokens than the Claude chat app?
- The chat app sends one message and gets one answer. Claude Code plans, reads files, edits, runs commands, and checks results, which can be eight to fifteen model calls for one task, each carrying the growing context. Same underlying model, far more tokens per unit of work, because it is doing the work of an agent rather than answering a question.
- What are cache read and cache write tokens on my bill?
- They are how prompt caching shows up on your usage. cache_creation_input_tokens is the one-time cost of storing a stable chunk of context (priced about 25% above base input); cache_read_input_tokens is every later turn reusing it (priced at about 10% of base input). Anthropic documents the multipliers. When most of your context is cache reads rather than fresh input, the same session costs far less.
- How much does a Claude Code session actually cost?
- Anthropic reports Claude Code averaging around $13 per developer per active day, and $150 to $250 per developer per month, with 90% of users under $30 a day. Your number depends on the models you default to, how disciplined your context is, and how much of it is cached. Those are the levers, not how often your team reaches for it.
- Does Claude Code share a usage quota with Claude.ai?
- It can. If you run Claude Code on a Claude Pro or Max subscription rather than API billing, it draws from the same usage limits as the Claude.ai chat app. On API billing it is metered separately, per token. Which one you are on changes how usage shows up and how you would optimize it.
- How do I reduce Claude Code token usage without doing less work?
- Change the defaults, not the workload. Route routine turns to a cheaper model, keep prompts and CLAUDE.md tight so less context loads each turn, and lean on caching so repeated context bills at the cache-read rate. That is the same output for fewer tokens. Codelitics reads what Claude Code already logs and ranks these moves with the saving next to each one.
Keep reading: how to reduce AI coding costs across every tool, measure Claude Code ROI, or see why a token dashboard is not the yield.