8 min read
Why Claude Code can cost you 2x to 10x your usage limits
I measured Claude Code on Opus 5.5. The same small fix jumped from 1.5x to about 10x after a short break, because the prompt cache expired. Here are the habits that cause it, and the ones that don't.
You can burn through a Claude Code limit 2x to 10x faster than you need to. It is not because you type too much. It is because you throw the prompt cache away.
I measured this on Claude Opus 5.5, in Claude Code 2.1.325, on the default 5-minute cache. The full method, the logs and the charts are in claude-code-usage-analysis. This post is the short version.
The coffee-break cliff
I took a session with about 97,000 tokens of history and asked it for the same class of small fix, after pauses of 2 to 13 minutes.
Inside the 5-minute cache window, usage stayed near 1.5 times a new session. All 5 warm continues landed between 1.49x and 1.52x, mean 1.51x. After the cache expired, the same fix jumped to about 10 times. All 5 stale continues landed between 9.76x and 9.92x, mean 9.83x.
That jump is a cache miss. While the cache is warm, the first request after the pause reads 96,000 or more tokens and writes only a few hundred. After it expires, it writes 86,000 or more and reads only a short prefix. Two runs with almost the same raw token count, about 294,000, differed 6.5x in usage. Raw token counts will lie to you.
The 10x figure is compared with a small, 3-call fix on that 97,000-token session. A smaller session would jump less. A larger one would jump more. A bigger next task shrinks the ratio, but the extra cost per carried token stays.
Compact before the break, not after
/compact only helps if it runs while the cache is still warm. Then the summary is written cheaply, and the history you carry across the break is short.
On that same session, /compact before the break, then the same small fix, used 2.5x a new session (2.47x to 2.51x, n=3). /compact after the break used 9.7x (9.2x to 10.3x, n=2). You already paid for the cold history. The next fix is cheap, but that does not undo the miss.
If you come back to a new task, run /clear and write three lines: Goal, Done, Next. That is about 1x, a fresh start.
# Before a break
/compact Keep: the open issue, files touched, test command
# Back after a break, new task
/clear
Goal: fix the currency rounding in invoices.
Done: tests in tests/test_invoice.py reproduce it.
Next: patch money.py, run the suite.
For scheduled claude -p jobs, start a new session every run and pass state in through a notes file. Continuing the last run with --resume across a gap longer than the cache is the same miss. The estimate is about 3x. That one was not tested live.
claude -p "$(cat .agent/handoff.md) Continue the nightly triage." --output-format json
Stay in the session for small related fixes
For a few quick, related fixes, starting over is the expensive habit.
Three quick fixes in three new sessions used more than the same three in one session continued inside the cache window. The continued session read 7.0% more raw tokens but rebuilt 53% fewer, so it used 27.7% less. Context peaked at 20,265 tokens. This is n=1, preliminary, and it only holds while history is small.
Long logs stay in the bill
A long test log costs you after Claude has already read it, because it stays in the chat and is re-read every later turn.
Compared with a 1-line summary, a normal failing pytest log (755 extra tokens in the chat) used 15% more over that turn and the next five. A long log, cut down by Claude Code to 5,051 tokens in the chat, used 1.64 times as much. n=2 per arm, preliminary, on about 17,000 tokens of context.
After a break the cache expires, and that log is written again with the rest of the chat.
Don't change the tool list mid-task
Turning off one built-in tool between turns made the next turn use 22x a normal turn (21.8x to 22.2x, n=2, preliminary). The next turn read 0% from the cache and wrote about 43,700 tokens again. The tool list sits at the start of the prompt, so nothing after it matches.
Anthropic's docs describe the same effect for a model switch. I did not test /model. Pick the model and the tools at the start.
Editing one line of CLAUDE.md, adding an MCP server, or changing effort did not break the cache in these runs. The next turn used 0.95x to 1.08x on average (n=3 each, Claude Code 2.1.325).
The CLI is cheaper than the Desktop Code tab
I ran the same bugfix in the Claude Code CLI, T3 Code, and Claude Desktop's Code tab. Same model, same 3-line CLAUDE.md, no user MCP servers, n=1 per client, preliminary. All three fixed the bugs.
T3 Code used 1.19x the CLI (1.17x to 1.20x by model). Desktop's Code tab used at least 1.80x (1.71x to 1.92x by model), and that number is a floor, because Desktop writes no cost_state row. Desktop's first request was 39,749 tokens, against 19,528 for the interactive CLI. I did not test the Claude chat app.
Compaction settings are not a free lunch
People treat a lower auto-compact trigger as an obvious saving. It is not.
One live setting, --autocompact 100000, sent 63% fewer raw tokens than the default (2.27 million compared with 6.12 million) and used 25.2% more. Most of the default's tokens were cheap cache reads. Summary calls were 11.8% to 25.5% of each compacting setting, about 36,600 units per compact, and they only show up in Claude Code's own cost line.
--autocompact 180000 is estimated at about 43% less on a long session. In a live test on a 270,000-token session it only tied the default. That was n=1, with no long pauses. The compact calculation failed when I checked it against the live tests, so treat trigger settings as something to measure on your own logs, not as a result.
Be careful with CLAUDE_AUTOCOMPACT_PCT_OVERRIDE. On a 1M-context model, 25 fires at about 245,000 tokens, which is reasonable. On a 200k-context model it fires at 45,000, below what a summary leaves behind, and the session thrashes: +239% in the model.
Does this apply to a subscription?
Yes, if you use an API key or usage credits: the cache lasts 5 minutes, which is what I measured.
If you use a Pro, Max or Ultra plan and stay within the five-hour and weekly limits, the cache lasts 1 hour. The miss is more expensive per token, a 1-hour write costs 2 times a plain input, not 1.25 times, but you have more time before it happens. I did not measure the 1-hour cache live. At the 97,000-token history, the adjusted calculation says a miss past the hour is 11.0 times a new session. The 5-minute miss was 9.8 times.
An open interactive terminal can also run idle compact on a 1-hour cache, which these resume runs do not. A finished claude -p job and a sleeping laptop cannot.
What I would actually do
- Before a break, run
/compactand tell it what to keep. - After a break, on a new task,
/clearand write three lines. - Keep one session for small related fixes in a row.
- Start scheduled
claude -pjobs fresh, with notes in a file. - Keep tool output short.
- Pick the tools and the model at the start.
- Prefer the CLI over the Desktop Code tab.
The repo has a prompt you can paste into Claude Code to score your own logs, without reading the raw text of your chats.
Limits
Most conditions ran once or a few times, on one model, on the 5-minute cache, often on a small next task. Findings with n under 3 are preliminary. These units follow API list prices, snapshot 13 November 2026. Subscription limits use weights Anthropic does not publish, so two settings can rank differently on a Max plan. The 10x figure is real for that setup. It is not a law of nature for every session.
If you want the tables, the charts and the analyzer, they are all in claude-code-usage-analysis.
