anthropics / anthropics/claude-code
[Bug] Disproportionate cache read token consumption in plan mode with clean sessions
- Vorherrschende Sprache
- Python
- Sterne
- 145k
- Forks
- 23.1k
- PR-Merge-Kennzahlen
- PR-Kennzahlen ausstehend
Beschreibung
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.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Bereich
- performance, tooling
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Aktiv
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100