anthropics / anthropics/claude-code
[Bug] Disproportionate cache read token consumption in plan mode with clean sessions
- Langage dominant
- Python
- Étoiles
- 145k
- Forks
- 23.1k
- Métriques de merge des PR
- Métriques de PR en attente
Description
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.
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Domaine
- performance, tooling
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- Active
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100