惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
人人都是产品经理
人人都是产品经理
爱范儿
爱范儿
aimingoo的专栏
aimingoo的专栏
博客园 - 叶小钗
H
Help Net Security
Microsoft Security Blog
Microsoft Security Blog
The Cloudflare Blog
S
SegmentFault 最新的问题
小众软件
小众软件
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 司徒正美
The GitHub Blog
The GitHub Blog
量子位
H
Hackread – Cybersecurity News, Data Breaches, AI and More
V
V2EX
Martin Fowler
Martin Fowler
博客园 - 【当耐特】
J
Java Code Geeks
D
DataBreaches.Net
云风的 BLOG
云风的 BLOG
F
Fortinet All Blogs
Blog — PlanetScale
Blog — PlanetScale
Last Week in AI
Last Week in AI

J.D. Hodges

Open WebUI Web Search Not Working? It's Off By Default Best Running Watch for High School Cross Country 2026 Claude Code Opus 5: Fix the VS Code Picker Still Showing 4.8 RTX 5090 vs 4060 in a Hybrid GPU Render Fleet RDP Slow on LAN? Fix the Remote Desktop 56 Kbps Trap Mac Prices Went Up June 2026: What Changed and What to Buy How to Set Up a SSH Connection in Claude Code Desktop How to Enable Wake-on-LAN on Synology NAS | Quick Guide Is the BCBS Settlement Payment Email Legit? (May 2026) How to Fix the VMware Workstation "mksSandbox" Crash (ISBRendererComm Error) - J.D. Hodges How to Check Codex Usage: CLI Status Line and Web Page How to Check Your Codex Usage on ChatGPT (Plus and Pro) MacBook Neo GPU vs Snapdragon X2, Radeon, Arc, RTX 5060 ThinkPad History: IBM 700C to Lenovo AI Workstations Codex /goal: How It Works, Setup, and What I Tested The BeBox: BeOS Hardware, Photos, and the Apple Deal That Wasn't Unable to Load Usage Limits in Claude? Use /usage Mother-In-Law Method for Claude Code Review (Honest Take) Best Laptop for Claude Code (2026) Best Way to Cook Corn on the Cob | Milk and Butter Boil Best Computer for ChatGPT (2026) | Laptops, Desktops, Budget Picks How to Use GPT-5.5 Today via Your Codex Subscription Remove McAfee WebAdvisor on Windows: Stop the Popup Codex Sandbox Error on Ubuntu 24.04: The AppArmor Fix WD19TBS Mouse Lag Fix: Dell Firmware Update Worked Claude Opus 4.6 vs 4.7 Max: WordPress Task Graded Claude Code Opus 4.7: Terminal + VS Code Upgrade Instructions Claude Code Rate exceeded. - J.D. Hodges Chuwi MiniBook X vs MacBook Neo: The $399 Laptop That Refuses to Throttle - J.D. Hodges Meta Muse Spark: The Honest Scorecard (3 Wins Out of 20)
Claude Code Prompt Cache Has Likely Expired: What to Do
J.D. H. · 2026-09-14 · via J.D. Hodges

Summary: Claude Code’s “prompt cache has likely expired” notice means your session sat idle longer than the prompt cache lasts. As of Sep 2026, by default, that’s 1 hour on Pro or Max while you’re within your included usage, and 5 minutes if you’re using an API key, a cloud provider, or usage credits. Your conversation is still there, but your next message will likely re-process all of it once. That turn can be slower and cost you a LOT more than a normal one, either in usage or API charges. Keep going if you need the history, or run /clear if you’re switching to something new.

Verified on Claude Code 2.1.269 in VS Code, September 12, 2026.

Claude Code idle notice estimating 586k tokens to re-cache after 1h 49m, with a red footer clock beside Fable 5.1 Max
I saw this on my Claude Max plan this morning, running Fable 5.1. The red box is mine for emphasis. Also, 586k tokens is a TON! I started a fresh session and gave it some context (info) myself, rather than burning all that needlessly.

What exactly does “prompt cache has likely expired” mean?

Every turn, Claude Code deals with your whole conversation. Prompt caching lets the API reuse what it already processed, at a much cheaper rate rather than resending everything.

The notice shows up when you reopen a session in the panel after its cache timer has run out. The (in this case VS Code) extension can’t see Anthropic’s cache, so it keeps its own timer from your last request. That timer uses the cache lifetime the API reported. That’s why it says “likely.”

The token number is the input size of your last request, which is basically the whole conversation. My other session showed 282k after sitting for six days when I finally came back for it. If you want to see how big a session is, the /context command breaks it down.

Claude Code notice reading Idle 6d 0h and estimating about 282k tokens to re-cache
Six days idle and 282k tokens. The number is about conversation size… idle time doesn’t change it.

Table: how long does Claude Code’s prompt cache last?

As of Sep 2026, the API only offers two cache lifetimes, 5 minutes or 1 hour. Here’s what Claude Code uses for your main conversation:

How you’re using Claude Code Default lifetime
Pro or Max, within included usage 1 hour
Past plan limits, using usage credits 5 minutes
API key or cloud provider 5 minutes

Every cache hit resets the timer, so it stays warm while you keep working. I checked three of my Max sessions from today: every cache write was a 1-hour write. So at “Idle 1h 49m,” I believe mine had been expired for about 49 minutes.

In VS Code, the little clock in the footer (left of the model name) counts down the minutes while the cache is warm. Once it expires, the clock turns red and the minutes disappear. In the terminal, /usage shows the same warm or cold status.

Footer clock showing 58m with tooltip Prompt cache warm, about 58 min left in a Fable 5.1 Max session
58 minutes left: that’s the 1-hour cache on my Max plan counting down while Claude was busy.

Does re-caching cost more?

Yes, a lot more. At Fable 5.1 if I were using API list prices, my 586k tokens would cost about $0.15 to re-read from a warm cache. Re-caching them after expiry runs about $11.72 at the 1-hour rate ($7.33 at the 5-minute rate). Ouch!!!! 😬 It’s a one-time hit (plus your new message and the reply), and then it’s cached again.

On Pro or Max there’s no per-token bill while you’re within your included usage, but the re-cache still counts against your usage limits. Resume a Pro or Max session that’s over 100,000 tokens and inactive for more than about an hour, and Claude Code says: “Resuming the full session will consume a substantial portion of your usage limits. We recommend resuming from a summary.”

What should I do when I see it?

  • Just send your message only if you still need the full conversation and it’s not too spendy on usage or credits. You pay the re-cache once, then it’s warm again and you keep going.
  • Run /clear if you’re moving on to something unrelated. A fresh start costs nothing. Or write a quick handoff if you only need the highlights (that’s what I frequently do).
  • Run /compact if you’ll keep working in this session for a while. Later turns carry a short summary instead of the full history. (more info below in the heads up)

Heads Up

/compact doesn’t dodge the big re-read on an expired cache. The summary request still has to process the whole history once, uncached, so the savings only show up on the turns after that.

How do I avoid it next time?

About to step away from a huge session? Run /compact while that footer clock is still warm. The docs say compacting on a warm cache costs a fraction of what the context size suggests.

On an API key, a cloud provider, or usage credits, as of now you can stretch the cache to an hour with "promptCacheTtl": "1h" in your Claude Code settings (or CLAUDE_CODE_PROMPT_CACHE_TTL=1h). The 1-hour writes cost 2x base input instead of 1.25x, so it only pays off if your breaks often run longer than 5 minutes but shorter than an hour.

Bottom Line

That 586k notice was a heads-up about usage, and my work was all still there but it would be pretty wasteful to continue. Next time for a session that big, I’d rather glance at the clock and compact before a break than eat the full re-cache when I get back. Hopefully this saves you a big re-cache or two!! 💰🙏

Note: if you have any tips/tricks/concerns, feel free to drop me a comment! I always appreciate feedback and tips from cool readers such as yourself! ✅

Sources and Further Reading

Information in this post was accurate when published on September 12, 2026 and was verified on Claude Code 2.1.269. Software changes fast, so if something here doesn’t match what you’re seeing, drop a comment and I’ll update it.