METHODOLOGY

Why you hit your Claude Code limit

AUGUST 25, 2026 · 9 MIN
TL;DR

Hitting your weekly limit almost never comes from a big instruction file. It comes from cache misses — idling past the cache timer, editing context mid-session, switching models — each of which pays to rewrite your whole session at full price. Fix the misses first; trimming a cached prompt saves about 10× less than you think.

Twice in two weeks, I hit the weekly cap on Claude Max — the $200 "20×" plan — and got told to come back in a few days. I usually run several workspaces and agents at once, and the cap doesn't wait for a convenient moment: it stops implementation in the middle of a large plan, right when you're in the flow of things, which is exactly when it costs the most. I hadn't done anything wild. I hadn't written a novel. And the usage screen just showed a big bar that said I'd used my week.

My first guess was the same one almost everyone makes: my CLAUDE.md is too big. I'd been piling instructions into it for months — the file the agent reads at the start of every session. So I opened it up to start cutting. That instinct was wrong, and chasing it would have saved me almost nothing. The real drain doesn't show up as a big instruction file. It shows up as a cache miss, it's invisible on any per-token chart, and the fix is how you work, not how much you cut. This is the machinery, explained just deeply enough that the fix makes sense.

You're not spending dollars — you're spending headroom

There are two completely different meters, and confusing them is the root of most of the panic.

On the pay-as-you-go API, each token has a price; use more, pay more. Simple, and it's the subject of the companion post. But on a flat subscription — Pro, Max, Team — you don't pay per token at all. You pay a fixed fee and get a rolling allowance of compute. The real constraint is a rate limit (a cap on how much you can burn inside a time window), and there are two of them running at once, both shared across Claude chat and Claude Code:1

So if you're a subscriber, "saving money" is the wrong goal. The goal is staying under the caps. The token weights below are published as API prices; on a subscription, read them as how heavily each token counts against your allowance. Same ratios, different meter.

Four kinds of token, priced like postage

Here's the fact that changes everything: "tokens" is not one number. A model doesn't read words, it reads tokens — chunks of about 3–4 characters, roughly three-quarters of a word. And every token is billed in one of four categories, weighted very differently, the way a letter and a parcel both go through the mail but don't cost the same to send.3

cache read0.1×
fresh input
output (incl. thinking)
cache write · 5 min1.25×
cache write · 1 hr

Reading from cache is 10–20× cheaper than writing it. Output includes the model's own "thinking," billed even when you never see it.

Token postage rates · weight per token, relative to base

The one to internalize: cache read is the cheap glance; cache write is the expensive event. Whenever someone says "that was 50,000 tokens," ask which kind — 50,000 cache reads cost about as much as 5,000 fresh ones.

The whiteboard: how caching works

Every turn, Claude Code re-sends the whole conversation — the API has no memory between requests, so your CLAUDE.md, the files you loaded, and every earlier turn go up the wire again each time. If that were re-processed from scratch on every turn, long sessions would be ruinous. They aren't, because of prompt caching.

Think of the cache as a whiteboard in the model's office. The first time you send a big block of context, the model writes it on the board — the expensive part, a cache write at 1.25× or 2×. Every later turn that starts with the exact same prefix just glances at the board: a cache read at 0.1×. It works on the prefix — the unchanged beginning of the conversation — and matches on the exact bytes.3

Write once, read cheaply — until something erases the board
  1. Turn 1 · WRITE1.25–2× base
  2. Turns 2…N · READ0.1× each — cheap
  3. Idle past TTL · MISSboard erased
  4. Next turn · REWRITEfull price, bigger now
MYTH VS REALITYThe myth: "my big CLAUDE.md costs full price every turn, so trimming it saves a fortune." The reality: on the cheap re-read turns that make up nearly all of an active session, that context is read from cache at about 10% weight. Trimming it saves roughly 10× less than you'd guess — cutting 2,000 tokens saves about 200 tokens' worth per cached turn. Real, but minor. The full-weight savings live on cache-write and cache-miss turns, which is what the rest of this is about.

When the whiteboard gets erased

A cache miss is when the model reaches for the whiteboard and finds it wiped. The entire prefix has to be written again at full cache-write price — not just the part that changed, all of it. This is the real quota killer, and it happens four common ways.

1. The idle trap. The cache has a timer — a TTL ("time to live"). Every read resets the clock; pause longer than the timer and the board is erased. Come back from a coffee break, type "ok, continue," and that one innocent message rewrites the whole session at full price. The bigger the session, the bigger the bill for the coffee. The Claude Code team has described the extreme version: a context near a million tokens, idled past the timer, re-written to cache all at once on the next message.4

2. Editing context mid-session. The cache matches on the exact prefix. Edit CLAUDE.md, toggle a plugin, change a tool definition — any change, even a single space, invalidates everything after it.3

3. Switching models or reopening old sessions. Caches are per model. Switch from Opus to Sonnet mid-session and the new model starts with an empty board; reopen a big session from yesterday and you pay one full rewrite before you get any work done.

4. The backfire trap. This one is almost funny. You read that big instruction files waste tokens, so mid-session you trim CLAUDE.md to save some. That edit invalidates the cache, which triggers a full-price rewrite of the entire session — you've just spent far more than the trim will ever save back. The "optimization" is the spike.

VOLATILE · CHECK YOUR OWN SETUPThe default TTL is 1 hour on a subscription, dropping to 5 minutes on usage credits or an API key. Two gotchas that bite subscribers: topping up with usage credits, or disabling telemetry, silently drops you back to the 5-minute timer — telemetry gates the 1-hour feature flag. Around March 2026 a change made the default regress to 5 minutes for many users, adding a reported 20–32% to cache-creation cost until it was caught. Defaults move; the only reliable source is your current settings.[^5]

Where the quota actually goes

Put it together and the ranking of what drains a subscription looks nothing like the folk wisdom. Highest impact first — the top three amplify each other:5

cache misseshighest
oversized sessions
tool-result bloat
no /clear between tasks
Opus on trivial work
idle background sessions
heavy tool / MCP catalogs
bloated CLAUDE.mdthe one everyone blames
over-budgeted thinking

Bar lengths show ordering, not measured proportions. The thing people trim first sits at the bottom.

Where the quota goes · relative impact, highest first

Two of these deserve a word. Tool-result bloat is the quiet one: read a whole file, dump a verbose command's output, paste a long log, and every one of those rides along in the context on every future turn — like stuffing every receipt into your backpack and then carrying the backpack everywhere. Practitioners name it the single biggest silent drain.5 And idle background sessions — a session left open in another terminal keeps making calls (compaction, background agents), and every one draws from the same allowance; one community reconciliation traced most of a blown quota to sessions someone forgot were running.6

The playbook

None of these ask you to do less work. They change when you do things and how much rides along. A few are always-on; the rest involve a trade-off worth a thirty-second check.

And the one that isn't optional:

The reframe

The lesson isn't "trim your context." It's that a cache miss is the expensive event — and you can't manage a cost you can't see. Everything above is either avoiding the miss or getting the evidence to know which miss you're paying for. The instinct to cut the biggest file is exactly backwards: the biggest file, cached, is nearly free; the small habit that erases the cache is what costs you the week.

That's the gap I kept falling into, and reading /usage after the fact was never enough — it tells you the tank is empty, not which habit drained it. So I started building the thing I actually wanted: a local dashboard that reads Claude Code's own session logs off your machine, shows where the tokens went, and warns before you hit the wall instead of after. It stores only the counts — token totals, sizes, model, timing — and throws the message content away; nothing leaves your laptop, which is the least-privilege posture I'd want for my own telemetry anyway. It flags the exact patterns in this post: the oversized always-loaded context, the marathon session carrying its whole history, the Opus turn a cheaper model would have served.

It's called AgentWrangler. The code's still local, but an early PRD is up at github.com/Doogit/AgentWrangler if you want to follow where it's headed. Stay tuned.

Footnotes

  1. Anthropic Help Center, "Use Claude Code with your Pro or Max plan" and "How do usage and length limits work?" (2026) — a 5-hour and a weekly window, shared across Claude chat and Claude Code; only relative plan multipliers are published, not absolute token budgets. First-party.

  2. Anthropic, Max plan and pricing pages — Max is 5× ($100/mo) and 20× ($200/mo) Pro; on Max, Sonnet and Opus draw from independent 5-hour and weekly buckets, shared on Pro. /usage is the only view of which cap binds. anthropic.com/news/max-plan; anthropic.com/pricing. First-party. 2

  3. Anthropic, Prompt caching documentation — cache-write 1.25× (5-minute) / 2× (1-hour) and cache-read 0.1× of base input; exact-prefix matching, any change (including whitespace) invalidates; the lifetime is measured from the start of the request, so a slow response eats into its own window. platform.claude.com/docs/en/docs/build-with-claude/prompt-caching. First-party. 2 3

  4. Boris (Claude Code team), Hacker News item 47880089 — a worked example of a ~900k-token context, idled past the 1-hour TTL, re-written to cache all at once on the next message. First-party, forum comment.

  5. Build to Launch, "Claude Code Token Optimization" (2026), naming unfiltered tool-call output accumulating in context as the single biggest driver; corroborated by Security Boulevard on context bloat from accumulated file reads. Community/practitioner. 2

  6. GitHub anthropics/claude-code issues #45756 ("Pro Max 5× quota exhausted in 1.5 hours") and #24147 (cache-read re-reads of CLAUDE.md dominating quota) — community JSONL reconciliations; one attributes most of a post-reset quota to background sessions. Community/practitioner.

  7. Anthropic, "Claude Code: manage costs effectively" — "Aim to keep CLAUDE.md under 200 lines by including only essentials." First-party.

  8. Anthropic, Claude Code commands reference — /usage shows plan-usage bars and flags behaviors ≥10% of usage; /cost is an alias for /usage; /doctor is a setup health check (installation, PATH, unused MCP servers, CLAUDE.md size). code.claude.com/docs/en/commands. First-party.

"A written rule is a suggestion. A gate is a control."
The operating principle behind every project here. The same bug shipped three times past written rules — and zero times past a CI gate. Deterministic enforcement beats advisory documentation, in agent harnesses and security programs alike.