anthropics / anthropics/claude-code

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

Abierto
#93,424 0 comentarios 0 reacciones 0 asignados Ver en GitHub
area:cost bug
Lenguaje dominante
Python
Estrellas
145k
Forks
23.1k
Métricas de merge de PR
Métricas de PR pendientes

Descripción

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.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Área
performance, tooling
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Activo
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.