Hacker News
Claude's 5-minute timer is 23% of your coding bill
AIFirst seen 439 points197 comments
A new study of 30 days of coding-agent use finds that Claude's 5-minute prompt cache timer causes much of the extra cost when a developer takes a short break. The timer runs out fast, so the tool has to pay again to rebuild the cache.
What happened
A study looked at coding-agent traffic from October 24 to November 22, 2026. It covered Claude Code, OpenCode, Codex, Pi, and Kilo. About 23% of the Claude bill went to rebuilding prompt caches that had expired while the developer was away. For GPT models in the same tools, the figure was about 9%.
Key numbers
- Claude: 23.1% of the bill went to rebuilding expired caches.
- GPT: 9.3% of the bill went to the same kind of rebuilding.
- Breaks of 5 to 30 minutes: Claude loses 15.2% of its bill, GPT loses 0.8%.
- Breaks over 30 minutes: both lose about the same share (7.8% Claude, 8.5% GPT).
- One 8-minute break on a 210,000-token Claude Opus 5.5 session raised one turn's cost from $0.04 to $1.05.
How prompt caching works
A coding agent sends the same long starting text again on every turn. A prompt cache saves that text so it is cheaper to reuse. Writing to the cache costs 1.25 times the normal input price. Reading from the cache costs only 0.05 times. The cache lasts for a set time, called the TTL (time to live). Claude's default TTL is 5 minutes. GPT-6.1 Sol's default is 30 minutes. Each cache read resets the timer.
Why it matters
When the agent is busy, the cache stays warm and costs are low. When the agent waits for the developer, a short timer can expire. Then the next turn pays the full write price on the whole conversation. This makes Claude coding tools more expensive for people who take short breaks. Most tools do not use Claude's 1-hour option, which costs more per write but lasts longer.
What to watch
- Whether coding tools start using Claude's 1-hour cache option more often.
- Whether Anthropic or its cloud partners change the default 5-minute timer.
- How the cost gap changes as the models and prices update.
Glossary
- prompt cache
- A saved copy of repeated text sent to an AI model, so it costs less to reuse.
- TTL
- Time to live: how long a saved cache stays before it expires.
- Claude Code
- A coding tool from Anthropic that uses Claude AI to help write and edit code.
- Codex
- A coding agent tool that uses OpenAI models to help write code.
- token
- A small piece of text, such as a word or part of a word, that AI models count when they charge.