Provider plan limits: show rolling Codex and Claude quota headroom #8148
BarretoDiego
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
The problem
The Usage page tells me what agents already consumed in tokens and API-equivalent cost. It does not answer the operational question that decides whether the next turn will run:
Codex and Claude expose rolling plan limits, but today the user has to leave T3 Code or wait for a provider-side warning to discover that a 5-hour or weekly window is nearly exhausted. Multi-account setups make that worse: a personal Codex account and a work Codex account must never be merged into one percentage.
What I built
A small plan-limit ring beside Settings and Usage. It summarizes the most constrained active window across connected environments. Clicking it opens the full provider/account breakdown.
Screenshots — multi-account plan limits
The footer meter expands into provider-instance snapshots. Each account keeps its own plan, rolling windows, reset times, and warning state.
Manual refresh updates every account that has an active provider session, preserves the last known snapshot for unavailable accounts, and explains partial failures.
Provider-reported limits, not local estimates
This feature does not infer quota from token history. The server normalizes what each provider reports:
Each window carries its label, used percentage, observation time, and reset time. Expired windows render as reset until the provider reports a new observation instead of repeating stale utilization.
Accounts stay separate
Limits are keyed by provider instance, not only by driver kind.
Codex - Pessoal,Codex - FieldPRO, and any other configured instance keep independent snapshots, labels, and reset windows.The on-disk cache is also identity-checked against the instance id, driver, and continuation/account home before hydration. Changing the account or home clears the previous observation instead of showing one account’s quota under another account’s name.
Refresh without starting a throwaway turn
Provider events update the snapshot while an agent works. The popover also has an explicit refresh action:
account/rateLimits/readon an active app-server session.There is no background polling loop and refresh does not create a fake conversation turn.
Surfaces
The existing local Usage analytics page remains separate. Usage history answers “what did I spend?”; plan limits answer “can this subscription keep working right now?”
Branch and review layers
Working branch:
feat/refresh-provider-plan-limitsThe implementation is layered as:
54a0bcc71— normalized provider plan limits, server ingestion/cache, sidebar meter, and mobile view95c630fc0— preserve limits per provider account/instanceafa4b8858— explicit refresh path and fresh provider snapshotsFocused coverage includes normalization/merge/reset behavior, provider registry hydration and identity mismatch, Codex and Claude ingestion, refresh RPC behavior, sidebar projection, contracts, and mobile rendering logic.
Relationship to the existing idea
Discussion #7833 asks for a usage tracker similar to provider status bars. This proposal is the concrete provider-reported quota side of that idea and is intentionally complementary to T3 Code’s local usage ledger rather than a replacement for it.
Product questions
I am happy to split the branch along the layers above. The main thing I would like to preserve is account isolation: combining same-provider accounts makes the meter look simpler while giving users the wrong operational answer.
All reactions