The short version
- Claude Code sends your whole conversation with every message, so a long session costs more per turn than a fresh one.
- Prompt caching makes the repeated part much cheaper, but it is still billed every turn, and it expires after a break.
- Your window is part-full before you type: instructions, tools, CLAUDE.md and memory all load first.
- Clear between tasks, keep CLAUDE.md short, hand big reads to subagents, and check
/context.
The meter runs on every turn
A turn is one round trip: you send a message, Claude works, Claude answers. It feels like a conversation with someone who remembers. It is not. Anthropic's documentation says the model "doesn't remember anything between requests", so Claude Code re-sends the full context each time: the system prompt, your project context, every prior message and tool result, and your new message.
The token is the unit you pay for, roughly a short chunk of text. Anthropic's cost guide states the consequence plainly: token costs scale with context size, and Claude Code sends your full conversation with every request. Each time Claude uses a tool, such as reading a file or running a command, that is another request carrying the same growing pile.
So a one-line question at the end of a session that has been open all day still pays for the whole conversation. The chart at the top of this page shows the shape. It is illustrative, not measured: it assumes a 50,000-token start and 5,000 tokens added per turn, and its 0.1x card is Anthropic's cache-read multiplier for most models.
Our own measurement. On 2026-11-06 we looked at one of our own long sessions, a 230-call build session that was never cleared. Per-call context grew from 57k to 594k tokens. Cache reads totalled 69 million tokens, 99% of everything processed. The 57k baseline of system prompt, tools and instructions was re-read on every call and made up about 19% of all cache reads. The biggest slices of context were the assistant's own replies (22%) and the shell commands it ran (21%). It is one session on one setup, so treat it as an example of the shape, not a benchmark.
For scale, Anthropic reports that across enterprise deployments the average cost is around $13 per developer per active day and $150 to $250 per developer per month, with costs below $30 per active day for 90% of users. Those are vendor figures and vary widely with model, codebase size and habits. If you pay per token, the pattern behind unexpectedly high spend, according to the same page, "usually traces back to long sessions that were never cleared or to Opus left as the default model."
What caching fixes, and what it does not
Prompt caching lets the provider remember the start of a request it already processed. Because each new request is the previous one plus a little at the end, most of it matches. Anthropic's Claude Code docs describe the effect: without caching the API would reprocess your full history on every turn, and with it the API reuses what it already processed and bills the re-read at the cached token rate.
The prices come from Anthropic's API documentation, as multiples of the normal input price:
- Cache read: 0.1 times the base input price. The page's footnote lists 0.05 times for Claude Opus 5.5 and Claude Sonnet 5.5.
- Cache write, five-minute lifetime: 1.25 times.
- Cache write, one-hour lifetime: 2 times.
That is a big discount, and it is the reason long sessions are affordable at all. It is not zero, though. Three things stop caching from solving the problem:
- The history is still billed every turn. Anthropic's cost guide says Claude Code re-reads the history at the cached rate, "so a one-line question in a session that has been open all day still draws usage for the whole conversation."
- The cache expires. By default the API cache has a five-minute lifetime, refreshed each time it is used. Claude Code requests a one-hour lifetime for the main conversation only on a Claude subscription within plan usage, and five minutes with an API key or usage credits. Your first message after a longer break reprocesses the full context.
- Some actions rebuild it. Switching models, changing some settings, or compacting can invalidate part or all of the cache, so the next turn is slower and costs more.
For the wider picture of cutting AI running costs, including batch discounts and model choice, see our guide to why AI costs overrun.
What fills the window before you type
The context window is the most text the model can look at in one request. Claude Code's own docs list what goes in before your first message: CLAUDE.md, auto memory, MCP tool names and skill descriptions, on top of the system prompt and tool definitions. CLAUDE.md is a file of instructions you write for a project. Auto memory is notes Claude writes itself, and the first 200 lines or 25KB of its index file load at the start of each session.
Two details help. MCP tool definitions are deferred by default, so only tool names and server instructions enter the context until Claude uses a tool. And skills load on demand: Claude sees their descriptions at the start, but the full text only when a skill is used. That is why Anthropic suggests moving specialized instructions out of CLAUDE.md and into skills, and keeping CLAUDE.md under 200 lines.
The only way to know your own numbers is to look. Run /context for a live breakdown by category. In our own setup, system prompt, tools, skills and connector descriptions came to a 57k-token baseline, which is why disabling unused connectors is on the list below.
What compaction keeps and drops
When the window nears its limit, Claude Code compacts automatically: it replaces the conversation with a summary. Anthropic says the summary keeps your requests and key code snippets, but "detailed instructions from early in the conversation may be lost", so rules that must last belong in CLAUDE.md. After compaction the project-root CLAUDE.md and auto memory are re-injected from disk, and Claude Code re-reads up to five recently touched files.
Compacting costs tokens too. To write the summary, Claude Code sends a separate request carrying your history. While the cache is warm that is cheap relative to the context size. After a long break there is no cache left, so the history is reprocessed as normal input. Anthropic's advice is to compact at natural breaks between tasks, not mid-task.
You can steer what survives: /compact focus on the auth bug fix, or a "Compact instructions" section in CLAUDE.md. Models with a 1 million token window exist, but a bigger window means a bigger bill per turn if you fill it, so it is a reason to be tidy, not a reason to stop.
Seven habits that cut the bill
- 1. Clear between unrelated tasksAnthropic's guide says stale context wastes tokens on every later message. Run
/renamefirst so you can find the old session, then/clear. Clearing costs nothing. - 2. Compact with a focus, at a breakWhen you want to keep going on the same task, run
/compactwith instructions about what to keep, between steps rather than in the middle of one. - 3. Keep CLAUDE.md shortAim for under 200 lines of essentials. It loads every session, so every word is paid for on every turn. Move workflow-specific instructions into skills.
- 4. Turn off what you do not useRun
/mcpand disable servers you are not using. Prefer command-line tools such asghorawswhere they exist, which add no per-tool listing. - 5. Send big reads to subagentsA subagent works in its own context window and returns a summary, so test output, logs and documentation stay out of your main conversation. Its requests still draw on your usage, so pick a smaller model for simple ones.
- 6. Ask for small, specific things"Add input validation to the login function in auth.ts" beats "improve this codebase", which triggers broad scanning. Stop early with Escape when Claude heads the wrong way.
- 7. Look at the numbersRun
/contextfor what fills the window and/usagefor session usage. After the first response,/usagealso shows a prompt cache line with your hit rate and whether the cache is warm.
Also worth knowing: match the model to the job. Anthropic says Sonnet handles most coding tasks and costs less than Opus, and thinking tokens are billed as output tokens. For agents that run on their own, our guide to running AI agents safely covers limits and logs that also keep spend in check.
Related guideYour AI pilot worked. Then the bill arrived.Eight ways to cut AI running costs, from right-sized models to batch processing.Making /clear safe
The reason people avoid /clear is fear of losing the thread. Part of that fear is unfounded: Claude Code saves the previous session, and you can return to it with /resume. What a fresh session lacks is the conversation itself, the reasons behind decisions and the state of half-finished work.
There are two ordinary fixes. One is a handoff note in a project file, which costs a minute and is the subject of our companion guide on closing a Claude Code session without losing the thread. The other is a searchable record outside the chat.
Evenfall is one way to do the second. It runs on your own computer, saves each Claude Code session as it happens (replacing passwords and keys with a placeholder first), and lets Claude search that archive with keywords before it asks you to explain again. It makes no calls to any AI service. In one of our own tests on 2026-11-06, a fresh session with Evenfall's start-of-session card found an old answer by itself in 6 turns, where the same question without it got an answer that Claude had no memory tool to look it up. The card itself added about 1.6k tokens.
Honest limits. Evenfall does not shrink a running session; it makes starting a new one cheaper in effort. It works on a Mac with Claude Code, searches best with keywords rather than vague questions, reads a transcript format that Anthropic says can change between versions, and only helps if Claude actually runs the lookup. We do not promise a token saving number: the saving comes from you clearing more often.
Questions people ask
Why does Claude Code use so many tokens?
Because the model keeps no memory between requests. Anthropic's documentation says Claude Code re-sends the full context with each request: the system prompt, your project context, every earlier message and tool result, and your new message. The longer the session, the more it sends on every turn.
Does prompt caching make long sessions free?
No. Caching lets the API reuse what it already processed and bill that part at the cache-read rate, which Anthropic's pricing lists as 0.1 times the base input price for most models and 0.05 times for Claude Opus 5.5 and Sonnet 5.5. That is a large saving, but the whole history is still billed on every turn, and the cache expires after a period of inactivity.
Should I use /clear or /compact?
Use /clear when you switch to unrelated work: Anthropic says stale context wastes tokens on every later message, and /clear itself costs nothing. Use /compact when you want to continue the same task with a shorter history, ideally at a natural break and with a focus such as /compact focus on the auth bug fix. Compacting a large context is itself a large request.
How can I see what is using my context?
Run /context for a live breakdown by category, including which CLAUDE.md and memory files loaded. Run /usage to see session token usage and, on subscription plans, a breakdown with recommendations. You can also show context use continuously in the status line.
Is clearing the chat safe? Will I lose my place?
Claude Code saves the previous session when you run /clear, and you can return to it with /resume. What a fresh session lacks is the conversation itself, so write down the state of the work in a project file first, or use a tool such as Evenfall that keeps a searchable archive on your own computer.
Clear long chats without losing the thread.
Evenfall saves every Claude Code session on your own computer, so Claude can look up past work instead of you re-explaining it. Free to start. Plans for sync, backup and teams are available on enquiry.
See EvenfallSources
- Manage costs effectively (accessed 2026-11-07)
- How Claude Code uses prompt caching (accessed 2026-11-07)
- Explore the context window (accessed 2026-11-07)
- How Claude Code works (accessed 2026-11-07)
- Prompt caching: pricing and lifetime (accessed 2026-11-07)
- Why AI costs overrun, and how to cut token spend
General information, not advice. Prices, multipliers, cache lifetimes and commands change between Claude Code versions and models; check Anthropic's current documentation. Our own measurement is a single session and not a benchmark.


