[BUG] Cache expiry warning shown in VS Code extension but not in terminal CLI on --resume
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
When resuming a session that has been idle for days, the VS Code extension shows a warning like Idle 3d 7h. The prompt cache has likely expired, so your next message will re-cache about 594k tokens.
The same session resumed from the terminal with claude --resume shows no such warning.
Environment
CLI: 2.1.272 (Windows, PowerShell)
VS Code extension: anthropic.claude-code 2.1.270
Plan: Max subscription
What Should Happen?
Expected: the warning should appear in both clients, since the cache state is a property of the session, not the client.
Error Messages/Logs
Steps to Reproduce
Leave a session with large context idle for several days
Open the workspace in VS Code — warning appears
Run claude --resume in PowerShell, select the same session — no warning
Expected: the warning appears in both clients, since the cache state is a property of the session, not the client
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.272
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
_No response_