anthropics / anthropics/claude-code

[BUG] Prompt cache expires during active session, causing massive token spikes on next prompt

Offen
#93,918 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
area:core area:cost duplicate platform:vscode platform:windows
Vorherrschende Sprache
Python
Sterne
145k
Forks
23.1k
PR-Merge-Kennzahlen
PR-Kennzahlen ausstehend

Beschreibung

### 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_

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Bereich
ai, api
Issue-Typ
Bug
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Aktiv
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.