Status line: expose per-model rate limit buckets in `rate_limits`, the way /usage shows "Current week (<model>)"
What I want
The status line payload's rate_limits currently carries two windows:
"rate_limits": {
"five_hour": { "used_percentage": 69, "resets_at": 1785180000 },
"seven_day": { "used_percentage": 35, "resets_at": 1785430000 }
}
/usage shows a third bar that the status line has no access to: Current week (Fable), the
weekly limit scoped to a specific model. I would like that bucket (and any future model-scoped
bucket) available in the status line payload in the same shape as the existing two, for example:
"rate_limits": {
"five_hour": { "used_percentage": 69, "resets_at": 1785180000 },
"seven_day": { "used_percentage": 35, "resets_at": 1785430000 },
"seven_day_scoped": [
{ "model": "Fable", "used_percentage": 58, "resets_at": 1785430000 }
]
}
Shape is not important to me; a single seven_day_scoped object for the current session's model
would be just as useful as an array of all of them.
Why
On a plan where one model has its own weekly allowance, that bucket binds long before the
all-models one, so it is the number that actually predicts when work stops. On my account right
now the all-models week is at 35% while the Fable week is at 58%. A status line that can only
show 35% is showing the wrong number by 23 points, and the gap widens the more of the week's
Fable budget gets used.
The status line is the natural place for this, because it is the surface that is always visible.
Quota that you have to open a panel to check is quota you discover at the moment it runs out.
Why the available workaround does not work
The data does exist locally. Opening /usage triggers GET /api/oauth/usage, and the response
body is cached in ~/.claude.json under cachedUsageUtilization, where utilization.limits[]
contains exactly what I need:
{ "kind": "weekly_scoped", "percent": 58, "resets_at": "2026-07-30T16:59:59Z",
"scope": { "model": { "display_name": "Fable" } } }
I built a status line against that cache and then removed it, because reading it cannot be made
correct:
- It is only written when something asks for it. Opening the
/usagepanel writes it, and so
does an SDK get_usage control request. There is no periodic refresh, no fetch at session
start, and nothing per message. For any user who never opens /usage, the key is simply absent
and the figure can never be displayed at all.
- It goes stale fast. The write is throttled to once per five minutes and the client itself
treats the entry as expired after an hour. Weekly model usage can move several points inside a
single session, so a reading from even 20 minutes ago misleads rather than informs.
That leaves a figure that works only for users who manually refresh a panel, and that is wrong
for them within minutes of doing so.
Note
The projection behind the SDK get_usage control request already appears to include
model-scoped limits, while the projection built for the status line includes only the two
unified windows. If that is accurate, this may be a matter of passing through data that is
already assembled rather than plumbing a new source.
Environment
Claude Code 2.1.220, win32, Claude.ai subscription seat (the rate_limits fields are present).
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗