A Router's 30-Day Data Says Pauses Over 5 Minutes Cost 23.1% of Claude Coding Bills, Against 9.3% for GPT. Here Is the Keep-Alive Ping I'd Add to My Own Agent Loop.
Requesty, an LLM router, published 30 days of billing data on December 1 with one headline number: on Claude coding traffic, 23.1% of the bill went to rebuilding the prompt cache after a pause longer than five minutes. On GPT traffic the same measure was 9.3%. Both labs charge the same cache multipliers on their current coding models. What differs is how long the cache lives by default.
If you pay per token for an agent loop, this is a line on your bill you can shrink with one small function. If you use Claude through a subscription, your invoice doesn't change, and you can skip to the last section.
What the data says
The author, Daniel Van den Berghe, looked at coding-agent traffic routed through Requesty between October 24 and November 22, across Claude Code, OpenCode, Codex, Pi and Kilo. The cohort is organizations spending $100 or more a month. Only token and billing counters were collected, no prompt text.
The gap sits almost entirely in short breaks. For pauses of 5 to 30 minutes, Claude traffic lost 15.2% of its bill and GPT traffic lost 0.8%. For pauses over 30 minutes the two are close, 7.8% and 8.5%. The post's summary of the cause: "Both labs charge the same per-token cache multipliers on their current models. The split comes from the default TTL."
Anthropic's pricing page confirms the Claude half. A cache write costs 1.25x the base input price and lasts 5 minutes. A read costs 0.05x on Opus 5.5 and Sonnet 5.5 and restarts the clock for free. A 1-hour write is available at 2x. The post says OpenAI's default on GPT-6.1 Sol is 30 minutes with a 12-hour option at 2.5x. I checked the Anthropic numbers against Anthropic's docs and took the OpenAI ones from the post.
One worked example makes the cost concrete. You're 210,000 tokens into an Opus 5.5 session and you step away for eight minutes. Had you come back inside five, the next turn would read the prefix from cache for about $0.04. After eight, it writes the whole prefix again for $1.05. Requesty says that happened on 81% of Opus 5.5 pauses in the 5 to 30 minute window.
What the data does not say
This is one router's traffic, published by a company that sells caching and routing, and the post ends by promoting that product. It gives no request or session counts. A Hacker News commenter called the 23% framing alarmist and said the figures reflect one population's habits. I think that's fair as far as it goes. The post does show a spread: the median Claude team lost 23.3%, with the middle half between 11.1% and 29.4%.
It also covers API billing only. Commenters disagreed about how subscriptions and subagents cache, and the post doesn't settle it.
And session length matters a lot. Requesty says 76% of Claude coding conversations finish within five minutes and lose nothing. Conversations longer than an hour carry about 80% of total spend, and those are the ones that pause.
The fix Anthropic documents
Anthropic's prompt caching docs describe pre-warming with a request that sets max_tokens to 0. It reads the cached prefix, bills zero output tokens, and restarts the 5-minute lifetime. Requesty's version is to send the last request body again, unchanged apart from that, after about four and a half idle minutes.
import copy
def keep_warm(client, last_request: dict):
ping = copy.deepcopy(last_request)
ping["max_tokens"] = 0
ping.pop("stream", None)
return client.messages.create(**ping).usage
That is the whole idea. I checked the function against a stub client, not against the live API, so read the usage it returns on your first run. If cache_read_input_tokens is zero, the ping wrote a new cache entry at 1.25x instead of reading one, and something in the request differs from the original.
The docs list the cases where a zero-token request is rejected: stream: true, extended thinking enabled, structured outputs, a forced tool_choice, and anything inside a Message Batches job. If your agent runs with extended thinking on, this ping fails as written, and changing the thinking setting changes the cache key. The 1-hour TTL is the documented route for that setup.
When a ping pays for itself
A ping costs one cache read. It saves the difference between a write and a read, but only if you come back. Requesty's break-even is read divided by write minus read, which for Opus 5.5 and Sonnet 5.5 is 0.05 / 1.20, or 4.2%. If the chance you return to the thread is higher than that, the ping is worth sending.
Their data on return odds is the most useful table in the post. In the first five turns of a conversation the chance of another turn after a pause is 2.7%, below break-even. From turn 6 to 10 it is 10.7%, and it keeps rising with depth. So the policy they recommend is no pings on young threads and two to six on deep ones. They estimate a net saving of about 8% to 9% of the Claude coding bill.
The obvious alternative, asking for the 1-hour TTL on every request from the first turn, came out worse in their replay. It raised cost by 1% to 10%, and 87% to 89% of sessions paid more, because most sessions end before the longer lifetime is ever used.
Where this could be wrong
The saving is an aggregate. In the same replay, 43% to 52% of long sessions spent more on pings than they saved, because the developer never came back. If you work in short, separate sessions, your loss to pauses may be near zero and a keep-alive would only add cost. Your harness also has to hold the last request body in memory for up to half an hour, which is a small data retention decision if prompts contain customer text.
Anthropic could also change the default. Nothing in the docs suggests it will.
What I'd actually do
Measure first. Pull a week of API usage and add up cache_creation_input_tokens on turns that came more than five minutes after the previous one. Price that at the write rate minus the read rate. If it is under 5% of the bill, stop there.
If it is higher, I'd add the ping to my own agent loop with two rules: none before turn 6, and at most three per idle stretch. That is the conservative end of the range Requesty recommends, and it caps the waste when I close the laptop and forget the session. Then I'd compare the next week's bill against the first measurement. For anyone on a flat subscription, none of this touches the invoice, and the only action is knowing that a break longer than five minutes has a cost somebody pays.
Author
Lukas
@lukcombinator