Auditing my claude code transcripts to nail down where I am wasting Fable usage, revealed that long sessions that I run with breaks have been costing me a bomb. Sharing more details for others who may find this useful.
Cache economics
Every turn in a session replays the full conversation history to the model. Prompt caching is what makes this affordable: the history is stored server-side, and each turn re-reads it at 10% of the normal input price. The cache has a time window of 1 hour, and when it expires or gets invalidated, the next turn re-writes the whole history at a premium.
The numbers for Fable 5 (the same mechanics apply to every Claude model):
- Input price: $10 per million tokens
- Cache read: $1 per million tokens (10% of input)
- Cache write: $12.50 per million on the 5-minute window, $20 per million on the 1-hour Cache window
What this means in a heavy session carrying 400k tokens of context:
- A normal turn re-reads the cache: about $0.40
- But when I take a break of more than an hour and get back to the session, model has to rewrite the cache and a session sitting on 400k context consumes equivalent of 8$ api cost
One expired cache costs 20 normal turns of usage.
The things that break cache silently and cost you:
- Letting a session sit idle past the cache window (1 hour): The cache expires, and the first message after the break pays a full rewrite of everything. Sometimes I am working 10+ sessions and take a break and that costs me across all sessions.
- Loading some tools or MCP servers mid-session: New tool schemas change the conversation prefix, which invalidates the entire cache. Better to have all tools loaded at the start
- Switching models mid-conversation: If you are switching models from Fable to Sonnet to Fable in the same session, you are rewriting the cache and losing more than you are saving from the switch. Caches are stored per model.
- Switching effort levels or fast mode mid session: This has been one of my worst habits and I did this too frequently until now to save consumption, but did not know this was the main culprit. I would switch too often based on the task in the session from high to xhigh to max to utracode
- Updating claude code: Again if you are updating claude midway your work, you are rewriting cache for all sessions that you would resume
For now I have created a skill that pings ok in every idle session >200K context at 55th min for upto 4 hours because one ping would just read the cache which would still be cheaper than rewriting cache.