anthropics / anthropics/claude-code

[Bug] Rate limit consumption disproportionate to measured token usage for opus-5-1m with prompt caching

Open
#92,201 1 comment 0 reactions 0 assignees View on GitHub
api:anthropic area:cost bug platform:windows
Dominant language
Python
Stars
145k
Forks
23.1k
PR merge metrics
PR metrics pending

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
[]
```

Contributor guide

No contributing guide indexed for this repository

Research direction

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.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.