← Reddit

Cache rewrites costed me 30% of my Fable consumption, here are the mistakes to avoid

Reddit · coolreddy · July 11, 2026
Prompt caching in Claude models stores conversation history server-side at 10% of normal input costs, but cache rewrites cost significantly more at $12.50-$20 per million tokens when the one-hour cache window expires or is invalidated. Actions that silently break cache include letting sessions idle past one hour, loading tools mid-session, switching models or effort levels mid-conversation, and updating code during active work. An engineer resolved cache expiration costs by creating a skill to ping idle sessions every 55 minutes, recovering approximately 30% of wasted API consumption.

Detailed Analysis

A Reddit post detailing one power user's forensic audit of their Claude Code transcripts has surfaced a costly but underappreciated mechanic in how Anthropic's models bill for long-running sessions: prompt cache expiration. The user, working with what they call "Fable 5" (an apparent internal or colloquial reference to a Claude model, possibly Sonnet or Opus in a specific deployment context), found that roughly 30% of their consumption was being burned not by actual reasoning or generation, but by silently rewritten context caches. The core issue is straightforward once explained: Claude Code and similar agentic coding tools replay the entire conversation history on every turn, and prompt caching exists specifically to make that affordable by storing history server-side and charging a fraction of the normal input rate to re-read it. But that cache has a strict one-hour time-to-live, and once it expires, the next turn must rewrite the full context at a significant premium — in the numbers shared, roughly $12.50–$20 per million tokens versus $1 per million for a cache hit. In a heavy session with 400k tokens of context, that translates to a single expired-cache turn costing the equivalent of 20 normal turns.

The practical takeaway is a list of easy-to-miss habits that silently invalidate caches: letting a session idle past 60 minutes, loading new tools or MCP servers mid-session (which changes the conversation prefix), switching models mid-conversation, toggling between effort levels or "fast mode" settings, and even updating the Claude Code CLI itself while sessions are still open. Each of these actions forces a full cache rewrite rather than a cheap cache read, and because caches are stored per-model and per-configuration, any change to the session's "shape" resets the economics. The user's workaround — a lightweight skill that pings idle sessions with more than 200k tokens of context every 55 minutes for up to four hours, just to keep the cache warm — is a clever, if slightly absurd, illustration of how much operational overhead sophisticated users are now investing in optimizing token economics rather than the underlying task itself.

This matters because it exposes a gap between how Anthropic's pricing model works in theory and how actual practitioners experience it in high-volume, long-session agentic workflows. Prompt caching was introduced as a cost-saving mechanism, but its narrow one-hour window and sensitivity to session changes mean it can just as easily become a cost trap for users who work in bursts, multitask across many parallel sessions, or need to adjust tool configurations and reasoning effort dynamically — all common patterns in real-world coding work. For developers running dozens of concurrent Claude Code sessions, as this user describes, the interaction effects compound: a single break can trigger cache invalidation across every open session simultaneously, turning what looks like idle time into a substantial bill.

More broadly, this reflects a maturing phase in how the developer community engages with frontier AI coding tools. As agentic coding assistants like Claude Code become embedded in daily workflows, the community's attention is shifting from raw model capability to operational efficiency — token economics, context management, and cache-aware usage patterns are becoming as important as prompt engineering was a year or two earlier. This mirrors similar dynamics that emerged around GPU utilization and inference cost optimization in other parts of the AI stack: as usage scales and becomes routine, the marginal cost of inefficiency scales with it, and power users start building tooling (like the idle-session "keep-alive" skill described here) to manage costs that were previously invisible. For Anthropic, posts like this also serve as informal, crowdsourced product feedback — highlighting that cache-window duration, mid-session model switching, and tool-loading behavior are areas where clearer documentation, longer cache windows, or smarter default behaviors could meaningfully reduce user costs and friction, particularly as Claude Code competes with other agentic coding platforms on total cost of ownership rather than just capability.

Read original article →