When Anthropic recently cut the price of a Claude Fable 5.1 cache read by 75%, our CTO, Ameya Kanitkar, noticed we weren't collecting most of that discount. One small config change later, our Claude Code token costs dropped 10 to 15% overnight.
He explained his thinking on LinkedIn:
Ameya Kanitkar, co-founder and CTO of Larridin, on LinkedIn:
Fable 5.1 cut the price of a cache read by 75%. We changed one setting in Claude Code to actually collect the savings, and our token costs dropped 10 to 15% overnight.
The setting is a cache lifetime. To see why one line of config moves the bill that much, look at where the money goes.
The biggest line on a Claude Code bill is the model re-reading what it already read. The top bar in the graphic splits one agentic coding task on Fable 5.1 three ways:
- Output tokens: 21%
- Fresh input: 23%
- Cached input, the context re-read on every turn: 56%
More than half the bill is the model reloading the conversation. The price cut applies to exactly that part. Cache reads went from $1.00 to $0.25 per million tokens, and the second bar shows the same task at the new rate: 42% cheaper.
The discount only applies while the cache is warm, so here is how the cache works.
Every turn in Claude Code is a fresh API request. The model remembers nothing between requests, so Claude Code re-sends the full history: the system prompt, your project context, and every prior message and tool result. The API matches that against what it processed recently and charges full price only for what changed. A cache hit costs $0.25 per million. A miss costs $10.
Every read refreshes the cache. It expires after a period of inactivity. The default is 5 minutes, and it depends on how you pay:
- Claude subscription, inside your plan's included usage: 1 hour for the main conversation
- API key, usage credits, Bedrock, Vertex: 5 minutes
- Subagents: 5 minutes, on every plan
Enterprise teams pay through an API key or a cloud provider, so they get 5 minutes. A subscription user who runs past their included usage gets dropped to 5 minutes too.
Now the coffee break.
You're 200K tokens into a session. You step away for six minutes. You come back, type one line, and the model re-reads all 200K tokens at $10 per million instead of $0.25. That one turn costs 40x what the previous turn did.
The two settings at the bottom of the graphic fix most of it. Both live in Claude Code's settings.json:
- promptCacheTtl: 1h
The main conversation lives for hours. A 1-hour cache costs 2x to write. Avoiding one full re-read of a long session pays that back.- subagentPromptCacheTtl: 5m
Subagents live for minutes. Paying double to write a cache nobody comes back for is waste. Leave them short.Two lines of config. No model change, no workflow change. That's where the 10 to 15% came from.
Anthropic cut the price of a cache read by 75%. Set the TTL and the cut shows up on your bill.
Why This Matters if You Run an Engineering Org
AI coding agents have turned into one of the bigger new lines in the engineering budget, and most of that spend stays invisible until the invoice shows up. Whether your teams use tools like Claude Code is old news by now. The better question is whether you're paying full price for work the model has already done.
Where the Money Goes
As Ameya put it, the biggest line on a Claude Code bill is the model re-reading what it already read. He split one agentic coding task on Fable 5.1 three ways:
- Output tokens: 21%
- Fresh input: 23%
- Cached input, the context re-read on every turn: 56%
More than half the bill was the model reloading the conversation. That happens to be the exact part Anthropic discounted. Cache reads went from $1.00 to $0.25 per million tokens (Anthropic pricing), and the same task at the new rate came out 42% cheaper.
The catch? That discount only applies while the cache is warm.
How the Cache Works (The 60-Second Version)
Every turn in Claude Code is a brand-new API request. The model doesn't remember anything between requests, so Claude Code sends the whole history again: the system prompt, your project context, and every message and tool result so far. The API checks that against what it processed recently and charges the cheap cache rate for whatever matches.
That cache expires after a stretch of inactivity. How long you get depends on how you pay (Claude Code docs):
- Claude subscription, inside your plan's included usage: 1 hour for the main conversation
- API key, usage credits, Amazon Bedrock or Google Cloud: 5 minutes
- Subagents: 5 minutes, on every plan
Most enterprise teams pay through an API key or a cloud provider, so they're on the five-minute clock. Subscription users who run past their included usage get bumped down to five minutes too.
The Coffee-Break Tax
Here's the scenario Ameya described, and you've probably lived it.
You're 200,000 tokens into a session. You step away for six minutes to refill your coffee. You come back, type one line, and the cache is gone. Claude Code has to rebuild all 200,000 tokens at full price instead of $0.25 per million.
At the base-input rate, reprocessing those tokens costs 40 times as much as a cache hit. Cache creation has its own higher write rate, so the exact first-turn bill also depends on the TTL and provider. Across meetings, lunch breaks, and other pauses, those rebuilds can add up.
The Fix: Two Lines in settings.json
Both settings live in Claude Code's settings.json, and you'll need Claude Code v2.1.242 or later:
{
"promptCacheTtl": "1h",
"subagentPromptCacheTtl": "5m"
}
Ameya's reasoning on each:
- promptCacheTtl: 1h keeps your main conversation's cache alive for an hour. A one-hour cache costs twice the base input price to write, but your main session runs for hours, and dodging a single full rebuild pays that back.
- subagentPromptCacheTtl: 5m keeps subagents on the short clock. They live for minutes, so paying extra to write a cache nobody comes back to is wasted money.
Two lines of config. No model change, no workflow change. That's where our 10 to 15% came from.
Want to make sure it took? Run claude -p "hello" --output-format json and look for a non-zero ephemeral_1h_input_tokens under usage.cache_creation.
Closing Thought
The real cost of AI tooling tends to hide in the defaults. Price cuts don't land on your bill by themselves.
So before your next budget review, ask your platform team which cache lifetime your developers are running with. Then ask whether your AI spend reporting can tell cached tokens from fresh ones. If it can't, there's no way to know whether price cuts are reaching you.
Ameya shares this kind of practical, numbers-first stuff on LinkedIn pretty regularly. If you want more of it in your feed, follow Ameya Kanitkar on LinkedIn. He's co-founder and CTO of Larridin.
Related Reading
On larridin.com:
- GitHub Copilot vs. Claude Code vs. Cursor: Total Cost Comparison: why AI coding tools should be compared on total deployment cost, not seat price.
- How to Measure AI Coding Tool ROI for Engineering Leaders: netting recovered developer time against rework and full usage-based spend.
Elsewhere:
- How Claude Code uses prompt caching: Anthropic's guide to cache lifetimes, the two TTL settings and how to check your hit rate.
- Claude pricing: current rates for cache reads and writes on every Claude model.