{"slug": "i-paused-claude-code-for-0-to-65-minutes-to-see-when-the-prompt-cache-expires", "title": "I paused Claude Code for 0 to 65 minutes to see when the prompt cache expires", "summary": "A developer's two-run test on Claude Code 2.1.295 with Opus 5.5 found the prompt cache stayed warm through a 55-minute pause but expired by 65 minutes, when 27,460 tokens had to be rewritten and the next message cost $0.253, 507% more than the $0.039–$0.043 seen at pauses of 0 to 55 minutes. Every cache write in the logs was ephemeral_1h, consistent with Claude Code's documentation that subscription usage within included limits gets a 1-hour cache while API-key and credit-based usage gets 5 minutes. The author notes the expiry tax scales with conversation size — rewriting a 200,000-token conversation costs about $1.60 before the message itself — and recommends /compact before a long break on the same task, /clear for a new task, and setting promptCacheTtl (5m or 1h, v2.1.242+) to choose the TTL.", "body_md": "# I paused Claude Code for 0 to 65 minutes to see when the prompt cache expires\n\nYou 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 sa\n\ny 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. Claude Code 2.1.295, Opus 5.5, medium effort, signed in with a subscription, headless (-p), no MCP servers Turn 1: build a small brick-breaker game in one index.html Wait 0, 4, 6, 15, 30, 55 or 65 minutes Turn 2 in the same session (--resume): \"Make the ball red and slightly faster.\" Each pause in its own session, all started within a minute of each other, run twice (October 20, 2026) If the cache lasts five minutes, the cost should jump between 4 and 6 minutes. If it lasts an hour, between 55 and 65.\n\nFirst model call of the next message, mean of two runs. Cost is Claude Code's API list-price estimate. Pause Read from cache Written to cache Next message cost 0 min 41,436 496 $0.039 4 min 43,232 466 $0.042 6 min 42,440 496 $0.042 15 min 43,076 502 $0.041 30 min 42,636 494 $0.043 55 min 43,183 502 $0.043 65 min 15,925 27,460 $0.253 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.\n\nBoth 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: How you sign in Main conversation Subagents, compaction, etc. Subscription, within included usage 1 hour 5 minutes Subscription, drawing on usage credits 5 minutes 5 minutes API key or cloud provider 5 minutes 5 minutes On Opus 5.5 a one-hour cache write costs $8 per million tokens (+100% vs normal input), a cache read $0.20 (-95%).\n\nSo 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: Under an hour: do nothing. Long break, same task: /compact before you leave. It's cheap while the cache is warm, and leaves only a small summary to re-cache.\n\nLong break, new task: /clear (the docs say it costs nothing). Check: from v2.1.251, /usage shows whether the cache is warm or cold. Choose the TTL yourself: promptCacheTtl (5m or 1h, v2.1.242+). Run claude -p \"hello\" --output-format json and look for ephemeral_1h_input_tokens vs ephemeral_5m_input_tokens to see which you get.\n\nOne 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.\n\n## Key Takeaways\n\n- •I couldn't find anyone who had simply waited and measured, so I did.\n- •This story was reported by **Dev.to** , covering developments in the**dev** space.\n- •AI advancements continue to reshape industries — read the full article on Dev.to for complete coverage.\n\n📖 Continue reading the full article:\n\n[Read Full Article on Dev.to →](https://dev.to/jaehyun_cho_0dff271e0d2e5/i-paused-claude-code-for-0-to-65-minutes-to-see-when-the-prompt-cache-expires-4ggl)", "url": "https://wpnews.pro/news/i-paused-claude-code-for-0-to-65-minutes-to-see-when-the-prompt-cache-expires", "canonical_source": "https://ainexusdaily.vercel.app/article/2026-10-20-i-paused-claude-code-for-0-to-65-minutes-to-see-when-the-prompt-cache-expires", "published_at": "2026-10-20 10:50:34+00:00", "updated_at": "2026-10-20 11:19:09.564695+00:00", "lang": "en", "topics": ["ai-tools", "large-language-models", "developer-tools", "ai-products"], "entities": ["Claude Code", "Opus 5.5", "Dev.to", "Anthropic"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/i-paused-claude-code-for-0-to-65-minutes-to-see-when-the-prompt-cache-expires", "markdown": "https://wpnews.pro/news/i-paused-claude-code-for-0-to-65-minutes-to-see-when-the-prompt-cache-expires.md", "text": "https://wpnews.pro/news/i-paused-claude-code-for-0-to-65-minutes-to-see-when-the-prompt-cache-expires.txt", "jsonld": "https://wpnews.pro/news/i-paused-claude-code-for-0-to-65-minutes-to-see-when-the-prompt-cache-expires.jsonld"}}