anthropics / anthropics/claude-code
[BUG] Prompt cache expires during active session, causing massive token spikes on next prompt
- Langage dominant
- Python
- Étoiles
- 145k
- Forks
- 23.1k
- Métriques de merge des PR
- Métriques de PR en attente
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?
2 days i see new message: Idle xxx minutes. The prompt cache has likely expired, so your next message will re-cache about 629k tokens.
### What Should Happen?
No idle count or cache expired as before!!
I don't wanna waste tokens on a bugged software working 2 minutes and then hit a 5h limit!
Pro-subscription, Opus 5
### Error Messages/Logs
```shell
```
### Steps to Reproduce
In not even long session just continue to work
### Claude Model
Opus
### Is this a regression?
Yes, this worked in a previous version
### Last Working Version
10 September 2026
### Claude Code Version
2.1.270
### Platform
Anthropic API
### Operating System
Windows
### Terminal/Shell
VS Code integrated terminal
### Additional Information
_No response_
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Piste de recherche
No repository file or test is named. Reproduce on Windows in the VS Code integrated terminal with Claude Code 2.1.270 by continuing a session until the idle/cache-expired message appears, then compare with the 10 September 2026 version. Done means active sessions no longer report cache expiry or trigger the reported token recache.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Domaine
- ai, api
- Type d'issue
- Bug
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Activité
- Active
- Clarté
- À clarifier
- Accessibilité débutants
- 25/100