Skip to content

[Bug]: Inactive weekly_scoped (Fable) limits are still dropped after #8088, hiding real per-account Fable usage from the pool #8110

Closed

Description

@daehwanahn

Client or integration

OpenCodex dashboard

Area

Authentication and account pool

Summary

Update: the shared-meter half of this (session / weekly_all) is fixed by #8088, merged to dev after 2.96.0 shipped. #8088 deliberately keeps weekly_scoped (Fable/Opus/Sonnet) rows active-only, and that remaining part is what this issue asks to change: an inactive Fable row still carries real usage (12% and 6% on two of my accounts) and is still hidden from the dashboard and from routing. The original report follows.

After a recent update, the Anthropic account rows on the dashboard (and ocx account list anthropic --quota) show only one quota window per account. The five-hour, weekly and Fable windows are no longer shown together, even though /api/oauth/usage still reports all three with real usage.

The cause is how is_active is read. Anthropic sets is_active: true on the limit that is currently binding for the account (one per account in every response I captured), not on "limits that apply to this account". anthropicUsageBuckets in src/providers/quota/anthropic-usage-windows.ts drops every is_active: false entry (line 40) and, because the window is already marked represented, also skips the legacy five_hour / seven_day duplicate. The non-binding windows therefore disappear.

Expected: all windows that the usage endpoint reports are shown and available to routing; is_active only marks which one is binding. The Claude Code guide says "only active model-specific weekly limits affect that model family", so the inactive filter appears to be meant for scoped family limits, but the code applies it to session and weekly_all as well.

This matters beyond display. Managing a multi-account pool needs every window for every account: with the filter, a Fable-exhausted account hides its 76% weekly usage, and the active account hides its own Fable usage, so the per-account quota the router reads is incomplete.

Reproduction

  1. Enable the Anthropic OAuth account pool with several Max accounts, some of which have exhausted the Fable weekly limit.
  2. Run ocx account list anthropic --quota --refresh --json.
  3. Compare each account's quota with a direct GET https://api.anthropic.com/api/oauth/usage for the same token.

Observed in 2.96.0 (8 accounts): each non-active account returns only one of fiveHourPercent, weeklyPercent, or a Fable customWindows entry. For example, an account whose usage response has session 0%, weekly_all 76% and Fable 100% shows only customWindows: [{label: "Fable", percent: 100}].

Usage-endpoint limits for that account (redacted):

[
  {"kind": "session", "group": "session", "percent": 0, "severity": "normal", "resets_at": null, "scope": null, "is_active": false},
  {"kind": "weekly_all", "group": "weekly", "percent": 76, "severity": "warning", "resets_at": "2026-11-03T11:00:00.301462+00:00", "scope": null, "is_active": false},
  {"kind": "weekly_scoped", "group": "weekly", "percent": 100, "severity": "critical", "resets_at": "2026-11-03T11:00:00.301646+00:00", "scope": {"model": {"id": null, "display_name": "Fable"}, "surface": null}, "is_active": true}
]

The same response also carries "seven_day": {"utilization": 76.0, ...}, which is ignored because weekly_all is already represented.

For the currently active account the binding limit is weekly_all (40%, is_active: true); session (17%) and Fable (12%) are is_active: false. Its dashboard row shows five-hour only because the response headers of served requests fill it in; the Fable 12% is not shown at all.

Local fix that resolves it (verified: all 8 accounts now show five-hour, weekly and Fable after ocx restart):

-    if (row.is_active === false) continue;
-    if (row.is_active !== undefined && row.is_active !== true) { familyEnumeration = false; continue; }
+    if (row.is_active !== undefined && typeof row.is_active !== "boolean") { familyEnumeration = false; continue; }

If routing should still treat a non-binding scoped limit differently, that decision could read is_active from the bucket row instead of dropping the window before display and routing see it.

Version

2.96.0

Operating system

Windows 11

Provider and model

anthropic (OAuth account pool) / claude-fable-5-1

Checks

  • I searched existing issues and documentation.
  • I removed secrets, tokens, account details, request credentials, and personal data.

Activity

  1. github-actions commented on Nov 2, 2026

    @github-actions
    Contributor

    Automated translation bookkeeping — detected language: English.

  2. coderabbitai commented on Nov 2, 2026

    @coderabbitai
    Contributor
    🔗 Related PRs

    #8069 - [WRONG BRANCH] release: promote frozen tip 007dbfd to main as 2.96.0 [merged]


    📝 Issue Planner

    Check the box below or use the @coderabbitai plan command to generate an implementation plan and prompts that you can use with your favorite coding assistant.

    • Create Plan

    🧪 Issue enrichment is currently in open beta.

    To disable automatic issue enrichment, add the following to your .coderabbit.yaml:

    issue_enrichment:
      auto_enrich:
        enabled: false

    💬 Have feedback or questions? Drop into our discord!

  3. changed the title [-][Bug]: Anthropic quota drops every is_active:false limit, so pool accounts show only one of five-hour / weekly / Fable[/-] [+][Bug]: Inactive weekly_scoped (Fable) limits are still dropped after #8088, hiding real per-account Fable usage from the pool[/+] on Nov 2, 2026
  4. added
    bug
    account-pool
    on Nov 2, 2026
  5. Ingwannu commented on Nov 4, 2026

    @Ingwannu
    Owner

    Confirmed on current dev (72e80d280d). #8088 changed only the shared rows. src/providers/quota/anthropic-usage-windows.ts:50 still drops every weekly_scoped row with is_active: false, and because line 41 marks the window as represented first, the legacy seven_day_fable duplicate is suppressed too. An inactive Fable measurement therefore reaches neither the dashboard (claude-cli-usage.ts) nor the routing windows (anthropic-decision-windows.ts, anthropicModelPercents / anthropicModelWeeklyPercent). This is currently documented behaviour (structure/providers/anthropic-account-pool.md, "Scoped rows retain active-only semantics"), not an accident. It does disagree with the legacy path, which always used seven_day_fable, and with the 7d_oi response-header path, which records Fable whatever the flag. Your capture (one is_active: true per account, nonzero inactive scoped usage) supports reading is_active as the binding marker for scoped rows too.

    Proposed narrow fix: treat finite weekly_scoped rows like the shared rows, so they are used regardless of a boolean is_active. A non-boolean flag still makes family enumeration incomplete, and legacy rows are still never revived. One side effect: an inactive Fable row at >=100% will exclude that account from Fable routing, which matches the old legacy behaviour. Tests: flip the Ultra inactive-Fable expectation in tests/providers/provider-anthropic-usage-windows.test.ts, and add a Max fixture with an inactive 12% Fable row plus a routing case in anthropic-active-limit-routing.test.ts. The docs that state the active-only rule get updated in the same patch. Since this reverses a contract #8088 kept on purpose, @lidge-jun — OK to flip scoped rows to the binding-marker reading? I will open the PR once you ack.

  6. daehwanahn commented on Nov 6, 2026

    @daehwanahn
    ContributorAuthor

    Still reproducible on 2.97.0, and dev @ 0a30c55 still has if (row.is_active === false) continue; at src/providers/quota/anthropic-usage-windows.ts:50. Here is what this looks like on a real pool, and why hiding these rows gets in the operator's way.

    What the dashboard shows (8 × Max 5x):

    • Account 1, the active account, shows 5-hour 8% and weekly 68%, and no Fable meter. According to usage.jsonl, this account served 213 successful claude-fable-5-1 requests (75.6M tokens, 437K output) after its current weekly window opened (1 Nov, 03:00 local).
    • Accounts 2 and 7, where Fable is the binding limit, show Fable at 9% and 8%. The other six accounts show no Fable meter.
    • The Anthropic entry in the provider quota summary follows the active account, so it also has no Fable row.

    Claude account rows; Account 1 (active) has no Fable meter, Accounts 2 and 7 do

    Anthropic Claude provider quota summary without a Fable row

    Why hiding them is a problem. On a Max pool, Fable has its own weekly bucket on top of the shared weekly limit. The decision I make several times a day is which model to run next and on which account: Fable where the Fable bucket has room, Opus otherwise. That decision needs every account's Fable percentage, whether or not Fable is the binding limit right now. An inactive Fable row with real usage is exactly the number that tells me how much Fable headroom remains before Fable becomes the binding limit. With the row dropped, I first see an account's Fable meter when Fable is already the limit that blocks it.

    is_active says which limit binds now. It does not say whether a limit applies. The sample in #8186 shows this: weekly_all at 69% with is_active: true, next to the Fable weekly_scoped row at is_active: false. The Fable limit still applies to that account; it just isn't the tightest limit yet. Treating it as absent removes real usage that the API reports.

    #8186 (currently a draft, held by the UI-screenshot check) restores these rows as display-only and keeps routing unchanged. That covers the display half. Please land it or an equivalent, and include the provider quota summary so the active account's Fable usage appears there too. The screenshots above can serve as the "before" images.

    Related: #8196 (Claude rows ignore the saved alias), which makes it hard to tell which subscription "Account 1" is in the first place.

  7. Ingwannu commented on Nov 7, 2026

    @Ingwannu
    Owner

    Thanks for rechecking on 2.97.0 and for explaining how you use these numbers. It still reproduces on current dev (aaa3c20f3f): src/providers/quota/anthropic-usage-windows.ts:50 still drops inactive weekly_scoped rows.

    On #8186: it covers the display half and leaves routing alone.

    • Inactive scoped rows are published as ProviderQuota.displayWindows. quotaFromUnknown in gui/src/provider-workspace/report.ts merges them into the bars.
    • The provider summary (ProviderCurrentQuota, ProviderOverviewDashboard) uses the same parser. It should show the Fable row as long as the server-side Anthropic provider report passes the new field through.
    • The PR's screenshot should show the provider summary as well as an account row.

    It is still a draft waiting on that screenshot and the readiness checklist, so it has not landed.

    The routing half is still waiting on the owner's decision. That is the contract question from my earlier comment: whether an inactive Fable row at >=100% should keep an account out of Fable routing. #8186 doesn't block that. If the binding-marker reading is accepted later, those rows move from displayWindows into customWindows.

  8. 001005HS commented on Nov 9, 2026

    @001005HS
    Contributor

    Still reproducible on 2.99.0 (npm). Every Claude account in a 5-account Max/Team pool now reports Fable only as an inactive weekly_scoped limit (is_active: false, percent 0-4%), and none of them shows a Fable meter in the dashboard or in /api/oauth/accounts. The same response bodies fed to 2.83.0's parser (readAnthropicUsageQuota in vendor-probes-oauth.ts) produce a Fable custom window for every account, so this is a regression for anyone upgrading from 2.83.

    Cause, as already described above: anthropicUsageBuckets (src/providers/quota/anthropic-usage-windows.ts) marks the window as represented and then skips the row on is_active === false, which also suppresses the legacy seven_day_fable duplicate.

    Until #8186 lands, here is a smaller display-only stopgap that keeps routing unchanged. It uses the existing modelId convention ("display evidence only, never eligibility" in quota-types.ts), which combos/resolve, quota-pool/assemble, quota/window-mapping, account-quota-rank and the GUI urgency sort already skip. Two consumers did not check modelId and are patched too:

    • src/providers/claude-cli-usage.ts (probeAnthropicUsageQuota): after the buckets loop, re-add each inactive weekly_scoped Fable/Opus/Sonnet row as { label, percent, resetAt, modelId: "family:<f>:inactive" }, with no scope.
    • src/oauth/anthropic-model-quota.ts (anthropicModelPercents): ignore windows with modelId.
    • src/routing/quota.ts (anthropicFamilyWindow): ignore windows with modelId.

    Checked on the v2.99.0 tag with this patch applied: bun check reports no errors, and 284 of 286 tests pass in the 12 Anthropic usage, routing and quota test files. The two failures are the tests that assert customWindows is empty for an inactive Fable row, which is the display change itself; restricted to gating windows (modelId === undefined) they pass. With an inactive Fable row at 100%, anthropicModelPercents(..., "claude-fable-5-2") and cachedProviderQuotaIsExhausted(..., "claude-fable-5-2") return the same values as unpatched 2.99.0, so routing is unaffected.

    The routing question (should an inactive Fable row at >=100% exclude the account) stays open, as noted above.

  9. lidge-jun commented on Nov 10, 2026

    @lidge-jun
    Owner

    Fixed on dev by #8186 (merge commit 937c819, head 582292e).

    Inactive weekly_scoped rows (for example Fable with is_active: false and no legacy seven_day_fable field) are now kept as display-only quota windows. The account quota bar shows the Fable percent, its reset time and the "Up to 50% of your weekly limit" allowance, tagged "Not in effect now" when the row is not the binding limit. Routing, exhaustion, cooldown recovery and pool assembly still read only active windows, so these rows cannot change account selection.

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

    account-poolbug

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions