Skip to content

Provider usage: Claude Code per-model weekly limit (Fable) disappears when the CLI serves "seeded" usage data #8306

Description

@FeelsGoodEtc

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_usage code 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

  1. Sign in to Claude Code with a subscription whose plan has a per-model weekly window (here: Fable).
  2. 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.
  3. 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 from rate_limits.limits[] (kind === "weekly_scoped" + scope.model.display_name). rate_limits.model_scoped is ignored.
  • Claude Code 2.1.330–2.1.332, get_usage handler: the result is {...utilization, model_scoped}, and when the read status is "seeded" it strips limits first (if (status === "seeded") { const { limits, ...rest } = utilization; ... }). seeded is returned when /api/oauth/usage is rate-limited and the CLI falls back to persisted or header data. model_scoped is still filled in that case: [{ display_name: "Fable", utilization, resets_at }].
  • So whenever the usage endpoint throttles, five_hour and seven_day survive 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

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 GENERATED and links the thread or report.

Activity

  1. added theissue type on Nov 28, 2026
  2. added
    providers
    provider-claude-code
    confirmed-repro
    on Nov 28, 2026
  3. bb-slop-cop commented on Nov 28, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    • Classification: Bug · Priority Medium · Effort Low. Applied labels: providers, provider-claude-code, confirmed-repro.
    • Report: Reproduction and root cause — REPRODUCED, root-cause confidence high. The normalization defect repeats in a second clean trusted-main checkout; live authenticated CLI throttling was not captured.
    • Root cause: Model windows come exclusively from limits; valid model_scoped data is ignored when canonical model rows are unavailable, while aggregate usage still succeeds.
    • Evidence: Three regression cases fail before the fix in both checkouts. Afterward, all 5 focused tests and all 12 relevant usage tests pass; typecheck, lint, and the repository build pass. Six unrelated broader-suite failures also reproduce on unchanged main.
    • Fix: Ready PR #8307 adds a validated fallback while preserving canonical precedence: 82 changed text lines across 2 files. Not merged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-reproprovider-claude-codeproviders

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions