ai newsDi., 20. Okt.
EilmeldungMicrosoft adds EU access oversight and offline AI to its sovereign cloud

I paused Claude Code for 0 to 65 minutes to see when the prompt cache expires

You work in Claude Code all morning, go to lunch, come back and send one more message. The first reply is slow and your usage jumps. The usual suspect is the prompt cache: once it expires, the next message has to re-process the whole conversation. But how long does the cache actually last? Guides s

dev.toDienstag 12:50 路 20.10.1 Min. Lesezeit
Bild: dev.to

You work in Claude Code all morning, go to lunch, come back and send one more message. The first reply is slow and your usage jumps. The usual suspect is the prompt cache: once it expires, the next message has to re-process the whole conversation.

But how long does the cache actually last? Guides say five minutes, others say an hour, and in April 2026 there was a whole controversy about it. I couldn't find anyone who had simply waited and measured, so I did.

If the cache lasts five minutes, the cost should jump between 4 and 6 minutes. If it lasts an hour, between 55 and 65.

First model call of the next message, mean of two runs. Cost is Claude Code's API list-price estimate.

Up to 55 minutes nothing changed. At 65 minutes the cache was gone: 27,460 tokens had to be written again and the same message cost 507% more. Both runs agreed. Every cache write in the log was ephemeral_1h.

Per Claude Code's docs, the default lifetime depends on how you sign in:

On Opus 5.5 a one-hour cache write costs $8 per million tokens (+100% vs normal input), a cache read $0.20 (-95%). So the expiry tax grows with conversation size: re-writing a 200,000-token conversation costs about $1.60 before your message does anything.

We only measured pause lengths; these come from the docs:

One small project and two runs, so treat the exact numbers as an example. The full write-up, with the pricing table, the bigger-session math and the limitations, is here:

馃憠 https://tokensave.app/blog/claude-code-cache-break-cost

Raw logs and CSV are open under CC BY 4.0.

Quelle: dev.to (dev.to). Original 枚ffnen