GeezerVison is showing github.com — fix(usage): accounts at their weekly limit no longer inflate pooled limits by AlexChambers · Pull Request #19152 · pingdotgg/t3code
Conversation
Problem
Why does Usage show an account with 100% of its session left when it can't send a single message?
Because Usage → Limits pools each window on its own. Once an account's weekly limit is used up, the provider refuses every request until the weekly reset, but the pooled Session row (and Claude's per-model weekly rows) still count that account's fresh session as available.
With one of four Claude accounts at 0% weekly, the pooled Session card said 95% left when 73% was usable, and Weekly · Fable said 81% instead of 57%. The "next refill" line advertised that account's session reset, which restores nothing it can use.
People read this number to decide whether to keep working or switch accounts.
Expected: pooled rows count only capacity the provider will accept, so an account at a used-up weekly adds nothing to Session or a per-model weekly until its weekly resets.
To reproduce: sign in two or more Claude (or Codex) accounts, use up one account's weekly limit, and open Usage → Limits. Session still counts that account's fresh session, and its segment and popover show it as available.
Change
One rule, in one pure function (poolMember in packages/shared/src/usageLimits.ts): an account counts as empty in a window while a broader limit that also counts its usage is used up.
| Provider |
Held window |
Held by |
| Claude |
Session, per-model weekly |
Weekly (all models) |
| Codex |
Session |
Weekly |
| Antigravity |
each 5-hour window |
its matching weekly |
| Cursor and others |
none |
unchanged |
A held account shows 0% with a lock beside a countdown to the reset that actually frees it, and its popover names the limit that's used up. Without them, the corrected 0% would contradict the provider's own session meter with no explanation. Refill amounts and hatching count only quota that is usable after the reset. The shared function decides all of this. Web, mobile and the mobile widget only draw it, which is why one fix touches three clients.
Why not min(session, weekly)
The first draft of #19035 proposed capping every window by the weekly with min(). That's wrong, and it was withdrawn on the issue (correction): session and weekly percentages are shares of different-sized allowances. With min(), a fresh session on an account with 46% of its weekly left would show "46% left", even though the whole session is usable. So accounts with any weekly left keep their real numbers, and only a used-up weekly holds an account. The issue text now describes this rule.
Scope and approval
Fixes #19035. The issue hasn't been triaged yet, so this relies on the exception for a focused fix of an obvious bug:
- The defect is plain: the pooled view reports capacity the provider refuses, and the provider's own weekly meter shows why.
- Purpose and impact: display only. No change to quota enforcement, provider calls, server code, contracts, or settings. Accounts with weekly headroom render exactly as before; only an account at a used-up weekly changes, to what the provider will actually allow.
- Only the changes the fix needs: +211/−103 outside tests (the other +447 lines are tests). The rule lives in one shared function. The lock, countdown and "Limited by" line on web and mobile explain the corrected 0%, which would otherwise contradict the provider's session meter.
docs/user/usage.md says such an account counts as empty and that its details name the used-up limit, because that is the unintuitive part.
One problem: every changed client draws the same shared result, so none of the changes is useful on its own. It adds no settings, views, or workflows.
It's independent of #13675 (plan weighting) and composes with it: holding is decided per account before pooling, so plan weights apply on top.
Verification
vp test run packages/shared/src/usageLimits.test.ts apps/mobile/src/widgets/subscriptionUsageSnapshot.test.ts: 87/87 pass. The 10 new cases cover the issue's example, weeklies with headroom staying unheld, a session spent past its weekly, several spent weeklies, pace on the holding clock, Codex, Antigravity, and Cursor staying unheld.
- Macroscope's one finding (a session spent past its weekly lost its own countdown) was fixed in 91ac573 with a regression test. Its "Not approved" verdict predates that commit. CodeRabbit has no actionable comments on the latest commit.
vp run --filter @t3tools/shared typecheck, and the same for @t3tools/web and @t3tools/mobile: all pass. Lint and git diff --check are clean on the changed files.
- Manual check on web against four real Claude accounts (renamed for the screenshots), with one at 0% weekly, taken a minute apart:
Before (main): Session 95%, Fable 81% |
After: Session 73%, Fable 57% |
 |
 |
- Web, the held account's popover, the next day with two accounts held,
main and the branch a minute apart:
Before (main): Session 83%, Spare "Left 100%" |
After: Session 35%, Spare "Left 0%", limited by its used-up weekly |
 |
 |
- Android emulator (API 36.1) running the T3 Code dev client against the same accounts,
main and the branch five minutes apart. Usage → Limits, then Spare's account screen:
Before (main): Session 93%, Spare 100% |
After: Session 69%, Spare 0% with a lock |
 |
 |
 |
 |
Not checked: iOS. The iOS dev client needs the iOS 27.1 SDK and this machine has Xcode 27.0. iOS renders the same UsageLimitsPooled.tsx as Android.
Implemented with GPT-6.1-Sol (Codex) and Claude Opus 5.5 (Claude Code) in T3 Code, reviewed with GPT-6-Astra.
🤖 Generated with Claude Code
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
An account whose weekly limit is used up cannot spend its session or
per-model headroom, but the pooled Limits view still counted it. Such an
account now counts as empty in its session and per-model rows, shows a
lock with a countdown to its weekly reset, and explains the hold in its
popover. Refill amounts only count quota that is usable after a reset.
Fixes pingdotgg#19035
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Uh oh!
There was an error while loading. Please reload this page.
Approvability
Verdict: Not approved
Macroscope's review found this PR not approvable — This PR changes the shared pooled-quota and reset algorithm across existing web, mobile, and subscription-widget paths for multiple providers, making it a substantial runtime behavior change rather than a small isolated fix. An unresolved Medium finding also identifies an omitted refill/reset case for accounts exhausted in both session and weekly limits.
Not approved because:
- 1 blocking correctness issue found at or above your repo's Minimum Blocking Severity
Adjust the Minimum Blocking Severity for this repo — including turning it Off — in Settings. You can add or adjust custom eligibility rules. Learn more.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
commented
Oct 13, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
-
⚙️ Run configuration
-
- Configuration used: Path: .coderabbit.config.ts
- Review profile: CHILL
- Plan: Advanced
- Run ID:
e9e0cfde-3fc9-48a9-9e34-30298c8dcfed
📥 Commits
-
Reviewing files that changed from the base of the PR and between c616e16 and 614988a.
📒 Files selected for processing: 7
-
apps/mobile/src/features/usage/UsageLimitsPooled.tsx
apps/mobile/src/widgets/subscriptionUsageSnapshot.test.ts
apps/mobile/src/widgets/subscriptionUsageSnapshot.ts
apps/web/src/components/usage/UsageLimitsPooled.tsx
docs/user/usage.md
packages/shared/src/usageLimits.test.ts
packages/shared/src/usageLimits.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
📝 Walkthrough
-
Pooled usage calculations now cap each member’s remaining quota when a broader limit is exhausted. Web and mobile displays use the effective quota and relevant reset. Usage snapshots select a reset that restores quota.
Changes: Pooled usage limits
| Layer / File(s) |
Summary |
Compute effective quota and reset restoration packages/shared/src/usageLimits.ts, packages/shared/src/usageLimits.test.ts |
Pool members record effective remaining quota and any holding window. Pool totals, pace, and reset restoration use the effective quota. Tests cover provider-specific binding rules and reset ordering. |
Show holding limits in pooled usage displays apps/web/src/components/usage/UsageLimitsPooled.tsx, apps/mobile/src/features/usage/UsageLimitsPooled.tsx, docs/user/usage.md |
Web and mobile views display effective remaining quota and use the holding window for countdowns. Labels and account details identify exhausted limits. The usage guide describes these indicators. |
Select the reset that restores quota apps/mobile/src/widgets/subscriptionUsageSnapshot.ts, apps/mobile/src/widgets/subscriptionUsageSnapshot.test.ts |
Usage snapshots select the first reset that restores quota, or fall back to the first reset. Tests cover reset selection and pooled remaining values. |
Priority: ⬆️ High
Estimated code review effort: 3 (Moderate) | ~25 minutes
Change: Bug fix · Severity of issue fixed: High
Suggested reviewers: juliusmarminge
Merge Risk: ⚪ Minimal · up to 61498
-
The pooled quota and reset changes are mergeable after normal checks; no demonstrated issue remains that needs correction before merging.
Security architecture risk: 🔵 Low · up to 61498
-
The inspected changes affect reported capacity and refill information, not permission to use accounts or consume quota. Existing account-management controls remain in place. No introduced security issue was substantiated, but incomplete coverage leaves some uncertainty.
Retained concerns
No architecture-level concerns identified.
Security review details
-
Security Blast Radius
- inferred — The demonstrated propagation scope is usage information displayed across pooled accounts in web, mobile, and the widget. The traced consumers do not turn the new capacity fields into quota enforcement, automatic account selection, or additional service authority.
Trust Boundaries and Controls
- observed — The changed web display preserves the existing reset-credit action boundary: redemption uses the account’s environment and input, requires confirmation, and retains busy and provider-management permission gating. Holding-window metadata changes the displayed explanation, not the redemption target or authorization condition.
Resilience and Maintainability Implications
- observed — The widget retains its expiration and unavailable-data behavior. Expiration considers snapshot age and pooled reset deadlines, and the timeline clears expired capacity instead of continuing to advertise it. The inspected full comparison changes reset-label selection, not the coordinator’s publication lifecycle.
Pre-merge checks: 4
-
Passed checks: 4 passed
-
| Check name |
Status |
Explanation |
| Linked Issues check |
 |
The pull request meets the coding requirements in #19035. poolMember keeps the raw quota when the broader weekly window has headroom and sets effective quota to zero only when the binding weekly win… |
| Out of Scope Changes check |
 |
The shared pooling change, web and mobile rendering changes, tests, and documentation directly support the pooled-limit behavior in #19035. The Codex and Antigravity binding rules apply the same withi… |
| Title check |
 |
The title names the main change: accounts at their weekly limit no longer inflate pooled usage limits. It follows the conventional commit format and matches the objectives and the changeset, which hol… |
| Description check |
 |
The description follows the template well. It has a Problem section with a clear reproduction path and expected behavior. It has a Change section that explains the shared rule and why the fix spans cl… |
✨ Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
When a spent session outlasts its spent weekly, or several binding
weeklies are spent, the countdown now lands on the last of those resets
instead of one that restores nothing.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A held account whose session outlasts its weekly reset now hatches just
the session quota that comes back, not its whole segment. The lock shows
even when the holding limit reports no reset time.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
AlexChambers
changed the title
fix(usage): pooled limits count accounts with a spent weekly as empty
fix(usage): accounts at their weekly limit no longer inflate pooled limits
Oct 13, 2026
|
@coderabbitai full review
The linked-issue warning compared this PR to the first draft of #19035, which proposed min(session, weekly). That draft was withdrawn because session and weekly percentages are shares of different-sized allowances, so min() mixes units. #19035 now describes the rule this PR implements: an account is held only while a broader limit that counts its usage is used up.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
commented
Oct 13, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
✅ Action performed
Full review finished.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Added mobile evidence to the description: main vs this branch on an Android emulator, for Usage → Limits and the held account's screen. Also added the web popover for the held account. iOS wasn't run: its dev client needs the iOS 27.1 SDK and this machine has Xcode 27.0. iOS renders the same UsageLimitsPooled.tsx as Android.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Note Written by gpt-6.1-sol on behalf of Maria
Thanks for investigating the pooled usage numbers. Right now we are only taking focused bug fixes from outside contributors, and this 762-line PR exceeds our 500-line limit for unvouched contributions, including tests. Main still counts session capacity from accounts with exhausted weekly limits, so the underlying defect is worth preserving. Read this first explains our limited review capacity. Please preserve the reproduction in issue #19035, or open an issue if needed, and submit a smaller focused fix for reconsideration.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
size:L
100-499 changed lines (additions + deletions).
vouch:unvouched
Author is not yet trusted in the VOUCHED list.
Milestone
No milestone
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.
|