Repository navigation
Description
Summary
The Provider usage card for Claude Code stopped showing the per-model "Weekly · Fable" row. "Current session" and "Weekly limit" are still shown. The server still sends the Fable row. Claude Code's get_usage control response drops rate_limits.limits[] when it serves a seeded (throttled/cached) read and puts the per-model data only in rate_limits.model_scoped, which provider-claude-code never reads.
Versions and environment
- bb 0.50.1 (desktop app), macOS 26 (Darwin 25.0.0)
- claude-code provider, Claude Code CLI 2.1.332 (same
get_usagecode in 2.1.330 and 2.1.331) - Claude Max subscription, OAuth login
- Personal workspace environment; several Claude Code threads running in parallel
Steps to reproduce
- Sign in to Claude Code with a subscription whose plan has a per-model weekly window (here: Fable).
- Open the Provider usage card (sidebar footer or plugin settings) while the claude.ai usage endpoint is throttled. Several parallel Claude Code sessions plus the card's polling are enough to hit this.
- Look at the Claude Code section.
Check what the CLI returns:
( printf '%s\n' '{"type":"control_request","request_id":"i1","request":{"subtype":"initialize"}}' '{"type":"control_request","request_id":"u1","request":{"subtype":"get_usage","skip_behaviors":true}}'; sleep 20 ) | claude -p --input-format stream-json --output-format stream-json --verbose | grep '"request_id":"u1"'
When the bug is present, rate_limits has model_scoped with Fable and no limits.
Expected vs actual
Expected: "Weekly · Fable" is shown whenever the account has that window.
Actual: only "Current session" and "Weekly limit" are shown. The Fable row is missing.
The server does return the row. Claude Code's cached usage snapshot (~/.claude.json -> cachedUsageUtilization.utilization.limits) contains:
{ "kind": "weekly_scoped", "group": "weekly", "percent": 20,
"resets_at": "2026-12-02T15:00:00.272399+00:00",
"scope": { "model": { "id": null, "display_name": "Fable" }, "surface": null },
"severity": "normal", "is_active": false }
Evidence
Where it breaks:
provider-claude-code/dist/host.js,getClaudeProviderUsage->normalizeUsage->scopedWindows: per-model windows come only fromrate_limits.limits[](kind === "weekly_scoped"+scope.model.display_name).rate_limits.model_scopedis ignored.- Claude Code 2.1.330–2.1.332,
get_usagehandler: the result is{...utilization, model_scoped}, and when the read status is"seeded"it stripslimitsfirst (if (status === "seeded") { const { limits, ...rest } = utilization; ... }).seededis returned when/api/oauth/usageis rate-limited and the CLI falls back to persisted or header data.model_scopedis still filled in that case:[{ display_name: "Fable", utilization, resets_at }]. - So whenever the usage endpoint throttles,
five_hourandseven_daysurvive and the per-model row disappears without an error.
Note: the SDK method is usage_EXPERIMENTAL_MAY_CHANGE_DO_NOT_RELY_ON_THIS_API_YET, and its shape is already changing between CLI releases.
Suggested fix: in scopedWindows, fall back to rate_limits.model_scoped when limits is missing or has no weekly_scoped rows (display_name -> model/label, utilization -> usedPercent, resets_at -> resetsAt). Keep the limits[] path when it is present.
Logs in ~/.bb/logs show no provider-usage error for this; it fails silently.
AGENT GENERATED. Diagnosed by Claude Code in bb thread thr_ifuhny3ix5 from the bundled plugin code, the Claude Code 2.1.332 binary and the cached usage snapshot.
What you ruled out
- Not a server change: the Fable
weekly_scopedrow is in the CLI's cached server response, and its shape matches whatscopedWindowsparses (surface: null, extramodel.idis ignored). - Not the provider-usage UI: it labels
{ kind: "weekly", model }windows correctly; the window never reaches it. - Not Provider usage: show and spend Codex and Claude usage-limit resets #6153 / Fix provider usage limit normalization #1024 / Account Pooler bills Fable to a Team account's extra usage while a pooled Max account includes Fable #3615: those are about resets, older normalization and Account Pooler billing.
- Not confirmed live: I did not capture a
get_usageresponse withstatus: "seeded"; the agent sandbox could not use the Claude login. The command in Steps confirms it.
Suggested priority and effort (optional)
Medium. Affects every Claude subscription with a per-model weekly window under usage-endpoint throttling, no workaround except waiting; effort probably Low
Checks
- I reproduced this on the latest release or on
main, or I say above that I could not. - I searched open and closed issues for the same problem.
- If an agent wrote this, the body ends with
> AGENT GENERATEDand links the thread or report.
Activity
bb-slop-cop commentedon Nov 28, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotproviders,provider-claude-code,confirmed-repro.limits; validmodel_scopeddata is ignored when canonical model rows are unavailable, while aggregate usage still succeeds.Preserve Claude model usage when canonical limits are unavailable (ge…
Preserve Claude model usage when canonical limits are unavailable (ge…