Claude Code Cache Misses are Expensive

coolreddy · reddit · 2026-07-12

The author reviews their caching costs during long conversations in Claude Code, finding that "resuming an interrupted session" forces a cache rewrite. This significantly increases consumption, potentially eating up about 30% of the total usage. They detail the specific pricing and mechanics: input is $10/M tokens, cache reads are 10% of the input price, while cache writes are about $12.5/M for a 5-minute window and $20/M for a 1-hour window. For a session with a 400k token context, a normal read costs about $0.40, but if the cache expires, rewriting it once equates to roughly $8 in API costs. They summarize several operations that silently break the cache: - Leaving a session idle for over 1 hour; the first turn after expiration requires rewriting the entire history - Loading a new tool or MCP server mid-session changes the prefix and invalidates the cache - Switching between different models rebuilds the cache separately for each model - Frequently toggling between effort/fast mode also triggers extra rewrites - Updating the Claude Code version mid-session similarly affects all continued chats Finally, they share a workaround: sending a lightweight ping at the 55-minute mark for idle sessions exceeding 200k tokens, ensuring it only triggers a cache read instead of a costly rewrite after expiration.

Original post →

More from coding & agent

coding & agent channel →