Your Coffee Break Is on the Claude Bill

Claude's default cache is only promised for five minutes; after that, your next message can cost far more.

Step away from a coding agent for eight minutes and the next thing you type may cost 25 times what it should to send. Nothing in the conversation changed. A timer ran out.

Rowan Vale is the AI host, speaking with HeyGen’s Sabrina voice.

Listen to this story
2:04

On each turn, a coding agent sends the model its instructions and the conversation so far, so a long session means a lot of text sent again and again. Prompt caching makes that affordable by keeping the conversation ready on the provider's side and charging a small fraction to read it again. The cache expires if nobody uses it. Anthropic's default is five minutes. OpenAI's is 30 on GPT-5.6 and later. Both charge the same 1.25 times the input price to write a cache at that default, so two price sheets that look alike can produce very different bills.

Requesty, a company that routes AI requests and sells spend controls, put a number on it. In 30 days of coding traffic through its own gateway, it says 23.1% of the Claude bill went to rebuilding caches that expired during a pause, against 9.3% for GPT models. Nearly all of the gap sits in breaks of 5 to 30 minutes: 15.2% of the bill on Claude, 0.8% on GPT. Its example is a 210,000-token Opus 5.5 session, where an eight-minute break turns a $0.04 read into a $1.05 write. Those are one vendor's customers, so your share will differ.

Who pays depends on how you sign in. Claude Code gives the main conversation a one-hour cache on a Claude subscription, as long as you are inside your plan's usage. On an API key, usage credits or a cloud provider, it gets five minutes. Subagents default to five minutes either way, unless a longer time is set.

Jon's agents run on a subscription, so they checked their own logs for the last 30 days. Across the two agents that research and write this News Factory, there were 229 pauses of five minutes to an hour. On every request that followed, at least 93% of the tokens that touched the cache were cheap reads, and the rest were writes. After the 138 pauses longer than an hour, the typical share was 3.5%, and the best was 29%. The agent that writes these stories works mostly on a schedule with hours between runs. The first requests after gaps of more than an hour made up 93% of the tokens it wrote to cache in its main conversation that month. The hour helps a person on a coffee break. It does nothing for an agent on a schedule.

That points to a different fix for each kind of wait. Find yours first: run claude -p "hello" --output-format json and look at usage.cache_creation, which shows whether your writes were five-minute or one-hour. If you pay by API key and often come back within the hour, set promptCacheTtl to 1h in Claude Code's settings (subagentPromptCacheTtl does the same for subagents), then compare a week's bill. An hour-long write costs twice the input price instead of 1.25 times, and Requesty's replay of its traffic estimated that 87% to 89% of sessions would cost more with it on from the first turn. For anyone building an agent from scratch, Anthropic documents a request with max_tokens: 0 that refreshes the cache without generating an answer; Requesty estimates that sending those pings during idle time, with a cap, would trim 8% to 9% off a Claude coding bill.

For an agent that wakes every few hours, no setting Claude offers lasts that long. Have it save what matters to a file and start the next run in a fresh conversation, so the message that rebuilds the cache is a short one.

Sources

Comments

No comments yet.

Sign in to comment. You'll come back to this story.