Repository navigation
fix(usage): show empty sessions when weekly quota is exhausted - #20349
Merged
juliusmarminge merged 5 commits intoOct 19, 2026
Merged
Conversation
Contributor
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a narrowly scoped usage-display bug fix that derives exhausted session/model rows from an exhausted weekly quota without changing stored provider data or quota enforcement. It includes targeted regression coverage for affected and unaffected providers, reset metadata, and refresh behavior. You can add or adjust custom eligibility rules. Learn more. |
Member
|
Taking over this one. I’ll keep the work on this PR, reduce the tests to the behaviors that matter, and check weekly exhaustion against session resets and model allowances before rebuilding it. Thanks @AlexChambers for the reproduction and proof. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Usage → Limits previously counted session quota from Claude and Codex accounts whose overall weekly allowance was exhausted. This made a four-account pool show 95% session quota when only 73% was usable.
The shared presentation now counts those blocked sessions as empty. Refill estimates respect both reset times: a session that resets first becomes usable at the weekly reset; an exhausted session that resets later stays blocked until its own reset; a partly spent session can regain only its unused portion at the weekly reset. Missing or stale reset times have no estimate. Web and mobile hatching uses the amount actually expected back. Claude model-specific weekly allowances retain their reported values, since an exhausted overall allowance does not establish that overage-inclusive model allowances are unusable. Provider snapshots and enforcement are unchanged.
Built on @AlexChambers' original contribution in #20349, preserving its commits and merging current main. This addresses the session-pooling portion of #19035.
Verification:
Not verified: live provider quota refresh or paid overage behavior, macOS, Windows, native iOS/Android, or the Electron shell. Widget behavior is covered by focused tests; the mobile UI received code review and typechecking. No merge was performed.
Implementation: GPT-6.1 Sol through the Codex harness in T3 Code; tests: GPT-6 Astra; adversarial review: Claude Opus 5.5 and GPT-6 Sol.