anthropics / anthropics/claude-code

[Bug] Disproportionate cache read token consumption in plan mode with clean sessions

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

説明

Title: Disproportionate token consumption in plan mode / clean sessions — dominated by cache read tokens

Description:
In clean sessions (no CLAUDE.md loaded, freshly started context), simple planning requests (plan mode) consume 60%+ of the session limit before the plan is even delivered. This pattern repeats consistently across multiple sessions, all on the Opus 5 model.

Evidence (ccusage / usage report):

Aggregate total across 16 sessions: 4,512,700+ input tokens, 4,279,800+ output tokens, but 17,112,000+ cache creation tokens and 1,144,460,000+ cache read tokens — cache read alone is roughly ~267x the actual input.
Total cost across the analyzed sessions: $823.91.
Most extreme single session (cb2d28d5-...): 1,370 messages, ~244 million total tokens, $168.64 — that one session alone accounts for ~20% of the period's total cost.
All sessions ran on Opus 5, even for planning tasks that did not require that tier of model.

Expected behavior:
Token consumption proportional to the actual complexity of the task. In a clean session, requesting an implementation plan should not consume most of the session limit without the plan even being delivered.

Observed behavior:
Massive cache read token volume, disproportionate to actual input/output, consistent with publicly documented cache inflation bugs (e.g. anthropics/claude-code#41617, #52979, #64961, #6586 — similar symptoms: trivial prompts consuming tens of thousands of tokens, excessive planning-mode overhead, 2-3x regressions after updates).

Impact:
The tool has become impractical for professional use on the current plan — session cancelled before the requested plan was delivered due to premature limit consumption. This is affecting my ability to work.

Request:
Please investigate whether there is a token accounting/cache inflation bug in the sessions listed above, and whether credit restitution is warranted for tokens consumed as a result of this bug.

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

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

調査の方向性

No source files or tests are named. Start by reviewing the ccusage/usage reports for the listed sessions and comparing the symptoms with the referenced issues #41617, #52979, #64961, and #6586; done means establishing whether the cache-read accounting is reproducible and identifying the responsible component or next investigation path.

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

評価

領域
performance, tooling
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
活発
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

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

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