anthropics / anthropics/claude-code
[BUG] Cache expiry warning shown in VS Code extension but not in terminal CLI on --resume
- Dominant language
- Python
- Stars
- 145k
- Forks
- 23.1k
- PR merge metrics
- PR metrics pending
Description
### Preflight Checklist
- [x] I have searched [existing issues](https://github.com/anthropics/claude-code/issues?q=is%3Aissue%20state%3Aopen%20label%3Abug) 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
```shell
```
### 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_
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.