anthropics / anthropics/claude-code

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

オープン
#93,918 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
area:core area:cost duplicate platform:vscode platform:windows
主要言語
Python
スター
145k
フォーク
23.1k
PR マージ指標
PR 指標を取得中

説明

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

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

評価

領域
ai, api
issue の種類
バグ
難易度
5/5
見積もり時間
1週間以上
活発さ
活発
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。