If you run a coding agent or a long-lived chat agent on Claude, one number in your bill deserves a second look: how often the prompt cache has expired by the time the next turn arrives. Requesty, an LLM gateway vendor, published an analysis of 30 days of coding-agent traffic and claims that 23.1% of the Claude bill went into rebuilding caches that expired while the developer was away. The mechanism is documented by Anthropic, so the interesting part is what to do about it.
What changed
Nothing in the API changed this week. What is new is a measurement. Requesty looked at traffic from Claude Code, OpenCode, Codex, Pi and Kilo between October 24 and November 22, 2026, using token and billing counters only. Their main findings:
- Pauses between 5 and 10 minutes alone account for 8.0% of the Claude bill, more than all breaks over an hour combined (5.3%).
- Breaks longer than 30 minutes cost Claude and GPT users roughly the same share, because both caches are gone by then.
- The gap comes from the default time to live (TTL): 5 minutes on Claude, 30 minutes on the GPT model they compare against.
This is one vendor's data set, and I could not verify the numbers independently. The pricing mechanics behind them, however, match Anthropic's documentation.
Why it matters in production
Anthropic's docs state that the cache has a 5-minute lifetime by default and is refreshed at no extra cost each time the cached content is used. A cache read on Opus 5.5 is billed at 0.05x the input price, a 5-minute write at 1.25x, and a 1-hour write at 2x.
For a 200,000 token conversation prefix on Opus 5.5, that is $0.04 for a read and $1.00 for a rewrite. One pause of eight minutes turns a 4 cent turn into a one dollar turn, a factor of 25. While the agent loops on its own, requests arrive every few seconds and the cache stays warm. The expensive moment is when a human reads a diff, or when a scheduled agent waits on a slow external system for more than five minutes.
That second case matters for operators. Cron jobs, webhook-triggered agents and long tool calls (browser sessions, builds, approvals) do not behave like a human, but they can have the same gaps.
What to do now
First, measure your own pause bill. The Requesty post suggests counting continuing turns more than 300 seconds after the previous one where cache_read_input_tokens is near zero and cache_creation_input_tokens is close to the full prompt size. Both fields are part of the usage block that Anthropic documents.
Second, check how your harness sets the TTL. In Hermes Agent, the prompt_caching.cache_ttl setting accepts 5m, 1h or auto. In the v0.23.5 source I read, auto resolves to 1h for sessions a person types into and 5m for machine-paced sources such as cron, subagents, webhooks and batch runs. The code comment gives the same reasoning as the pricing page: 1h writes cost 2x instead of 1.25x and only pay off when turns are more than five minutes apart. Our own config still pins 5m, so auto for the interactive profile is the next thing I plan to try.
# ~/.hermes/config.yaml prompt_caching: cache_ttl: auto # 1h for human-paced sessions, 5m for cron and subagents Third, if you build your own harness, Anthropic documents a pre-warm request with max_tokens: 0. It writes the cache at your breakpoints and returns an empty response without output tokens. Requesty reports that re-sending the last request body this way after about 4.5 minutes of idle time saved around 8% to 9% net in their replay. The break-even for one ping is read price divided by (write price minus read price), which is 4.2% on Opus 5.5, meaning the user has to come back with at least that probability.
Caveats
- The 23.1% figure is an average across tools and teams. Your share depends on how many sessions run longer than an hour and how often people pause. Short single-shot agent runs lose almost nothing.
- Switching to the 1-hour TTL from the first turn means every write costs 2x. Requesty reports that this made 87% to 89% of sessions more expensive. Their live test also found that on the Anthropic API a warm 5-minute entry is not upgraded in place; the request rewrote the whole prompt. Treat that as their observation, not documented behavior.
- Anthropic documents that
max_tokens: 0is rejected withstream: true, extended thinking, structured outputs, forced tool choice and inside Message Batches. A keep-alive ping needs a stored copy of the last request and the same thinking and effort settings as the real call. - Mixing TTLs in one request works only if the 1-hour entries come first.
- Requesty sells a gateway, so read the comparison with GPT as a vendor view. The Claude-side mechanics are the part I could check against first-party docs.
Sources
- https://www.requesty.ai/blog/claude-5-minute-prompt-cache
- https://platform.claude.com/docs/en/build-with-claude/prompt-caching
- https://news.ycombinator.com/item?id=50717029
Field Notes is a short series by MadeByBrain about what changes in the AI agent tooling we run in production every day. Researched and drafted with AI assistance (Hermes Agent), fact-checked against the linked sources and reviewed by Steffen Hartmann.
