NewsCrawler.org

Why Claude Code can cost you 2x to 10x of your usage limits

Why Claude Code can cost you 2x to 10x of your usage limits
The same small fix on a session of about 97,000 tokens. Inside the 5-minute cache window, usage stays near 1.5 times a new session. After the cache expires, it jumps to about 10 times. Each point is one live Opus 5.5 run.
After the cache expires, each old history token costs 12.5 to 40 times as much as a cheap re-read
Usage for the next task as history grows: a warm continue, a stale continue, and a new session
Image: Reddit

The write-up, which accompanies the claude-code-usage-analysis repository on GitHub, says that Claude Code usage is driven by cache misses[1] rather than by how much the user types. The expensive habits are ways of discarding the prompt cache[2], which lasts 5 minutes with an API key or usage credits and 1 hour with a subscription within its usage limits. The authors measured pauses of 2 to 13 minutes on the 5-minute cache.

In the authors' live tests, a small fix in a session with about 97,000 tokens of history used about 1.51x the usage of a new session while the cache was warm, and about 9.83x after the cache expired. The article says /compact[3] only helps if it runs while the cache is still warm. The analyzer runs locally on the files in ~/.claude/projects and reads summary numbers, not the text of chats.

The recommended habits are to start a fresh claude -p session for each scheduled run, to run /compact before a break, and to run /clear with a three-line reminder (Goal, Done, Next) when returning to a new task. The article calls --autocompact 180000 an unproven idea: its calculation shows about 43% less usage, but in one live test on a 270,000-token session it only tied the default.

Read the original github.comDiscussion

Discussion

Commenters mostly say the cache timing is hard to see: one asks for a UI indicator when the cache has expired, and another asks how users are supposed to know about the 5-minute limit. Some find the advice too much to manage, while others report that capping context per task or enabling idle compaction kept their usage under control. One commenter called the write-up unuseful.

Sources

Published: First seen: Читать по-русски

Open as a page