anthropics / anthropics/claude-code
[Bug] Rate limit consumption disproportionate to measured token usage for opus-5-1m with prompt caching
- Langage dominant
- Python
- Étoiles
- 145k
- Forks
- 23.1k
- Métriques de merge des PR
- Métriques de PR en attente
Description
**Bug Description**
Usage limit consumed far faster than in August despite 3-4x lower measured token
consumption.
Symptom: hit ~50% of the 5-hour limit in ~50 minutes of work (4.17 hours
remaining on the window). This started a few days ago. Same workload as before:
multiple concurrent sessions, heavy code and file editing across several repos.
Measured from my local transcripts (summing input + cache_creation + cache_read
+ output per assistant record, weighted 1x / 1.25x / 0.1x / 5x):
period turns/day weighted tokens/day avg context/turn
Aug 5-12 1000-2650 60-155M ~400k
Aug 24-28 700-2170 32-96M ~300k
Sep 1-4 810-1373 25-37M ~150k
Consumption is DOWN 3-4x on every axis versus early August, when I was not
hitting caps. Cache reads are ~63% of weighted cost (205M raw on Sep 4).
Ruled out locally:
- Model unchanged throughout: opus[1m] (settings.json, confirmed against a
Sep 1 backup of the same file).
- effortLevel went DOWN on Sep 1, xhigh -> high. Nothing got more expensive.
- Average context per turn dropped from ~400k to ~150k.
- Only config additions in the window: a UserPromptSubmit hook that emits
nothing below 200k context, and one unused skill directory.
Expected: limit consumption roughly proportional to tokens billed.
Actual: limit consumption up sharply while measured tokens fell 3-4x.
Question: did rate-limit weighting change for opus[1m] (long-context surcharge
above 200k, or cache-read weighting) in the last several days?
Env: Claude Code on Windows 11, model claude-opus-5[1m], effortLevel high.
**Environment Info**
- Platform: win32
- Terminal: windows-terminal
- Version: 2.1.260
- Feedback ID: 57c276e4-b426-4114-bd82-7f348d3da485
**Errors**
```json
[]
```
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Piste de recherche
Start from the reported environment: Claude Code 2.1.260 on Windows 11 with model claude-opus-5[1m] and feedback ID 57c276e4-b426-4114-bd82-7f348d3da485. First determine whether rate-limit accounting and prompt-cache weighting live in this repo or an external service. Done means maintainers can confirm an expected policy change or identify a client-side bug causing disproportionate limit consumption.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- python
- Domaine
- backend, cli
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- Active
- Clarté
- À clarifier
- Accessibilité débutants
- 35/100