[Bug]: Codex usage limits intermittently reset to 100% in T3 Code desktop after refresh
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 23k
- Forks
- 5.9k
- Avg merge
- 11h 14m
- Merged PRs (30d)
- 357
Description
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
apps/desktop
Steps to reproduce
- Start T3 Code desktop on Windows and use the Codex provider with a ChatGPT Business account.
- Use Codex enough that the account has consumed part of both the rolling 5-hour window and the weekly window.
- Open Usage → Limits and refresh the limits view.
- Repeat the refresh several times while comparing the displayed values with the Codex CLI usage status.
- On the affected account, the correct state is sometimes displayed briefly, then the values change back to a full/default-looking state.
Expected behavior
The Usage → Limits page should display the latest rate-limit snapshot from the authenticated Codex account consistently. A refresh should not replace valid values with defaults or an older snapshot. The 5-hour and weekly percentages and reset timers should remain aligned with the Codex CLI, and 100% remaining should be shown only when the provider reports 100% remaining.
Actual behavior
The display is intermittent. In one correct capture, T3 Code shows Session: 17% left and Weekly: 71% left. After refreshing, the correct values can appear for only a fraction of a second, then the page resets to Session: 100% left with a 4h 59m countdown and Weekly: 84% left with a 6d 12h countdown. Other captures show the correct 17% / 71% values again.
The Codex CLI reports the consumed state consistently: 17% left for the 5-hour limit (reset in about 3 hours 26 minutes in the capture) and 71% left for the weekly limit (reset at 17:19 on 19 Sep). Repeated refreshes in T3 Code sometimes show the correct state and sometimes the incorrect 100% / 84% state.
Impact
Minor bug or occasional failure
Version or commit
T3 Code desktop Nightly (the exact nightly build is not visible in the screenshots)
Environment
Windows 11 Pro 24H2, 64-bit, build 26200; T3 Code desktop Nightly; Codex CLI v0.154.0; Codex model gpt-5.6-luna; ChatGPT Business workspace account.
Logs or stack traces
No raw logs attached. The CLI screenshot was redacted before sharing: the account email, workspace/plan identity, and session UUID were removed. No credentials, tokens, or session identifiers are included below.
Observed values:
| Source | 5-hour/session | Weekly |
| --- | --- | --- |
| Codex CLI, consistent capture | 17% left, resets in about 03:26 | 71% left, resets at 17:19 on 19 Sep |
| T3 Code, correct capture | 17% left, resets in about 2h 8m | 71% left, resets in about 6d 16h |
| T3 Code after refresh, incorrect capture | 100% left, resets in 4h 59m | 84% left, resets in about 6d 12h |
The supplied T3 Code screenshots show both the correct and incorrect states. The terminal evidence has been redacted so it does not expose the account email, workspace identity, or session UUID.
Related tracker items checked:
- #10835 covers two distinct Codex subscriptions sharing one email, which is not established here.
- #10701 covers duplicate subscription rows in /usage-limits, which is not the observed symptom.
- #11136 covers account switching, which is not the observed symptom.
Screenshots, recordings, or supporting files
Workaround
Refreshing again may eventually show the correct values, but there is no reliable workaround. The Codex CLI usage display is the dependable reference.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in apps/desktop by tracing the Usage → Limits refresh flow and the authenticated Codex usage response. Compare the data received on repeated refreshes with the Codex CLI values, focusing on why a valid snapshot is replaced by defaults or an older snapshot. Done means the 5-hour and weekly percentages and reset timers remain consistent after refreshes, with tests covering the intermittent state.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100