Repository navigation
Description
Problem or use case
OpenAI rolled out rate-limit reset banking on June 11, 2026 (Codex app 26.609). Plus/Pro/Business subscribers now receive banked resets (one free at launch, more via referrals) that they can save and trigger manually when they need the headroom rather than waiting for a fixed timer. Banked resets are valid for 30 days.
Orca already has excellent Codex account management — add/remove/select multiple accounts, per-account usage tracking, and rate-limit monitoring (5h + weekly windows with percentages and reset times). But it does not surface the banked-reset count or provide a way to consume one, which means users with multiple Codex subscriptions have to leave Orca and open the Codex desktop app to check or trigger a reset.
Existing relevant code
- Rate-limit fetcher (
src/main/rate-limits/codex-fetcher.ts): callsaccount/rateLimits/readvia JSON-RPC and extractsprimary/secondarywindows. The API now returns additional fields likecredits,planType, and likelybankedResets/availableResetsthat Orca ignores. - Rate-limit types (
src/shared/rate-limit-types.ts):ProviderRateLimitshassessionandweeklywindows but nobankedResetsfield. - Codex account service (
src/main/codex-accounts/service.ts): manages multiple accounts with path-safe switching, identity parsing, and per-account CODEX_HOME isolation. - Usage UI: status bar
resource-usageitem and usage overview pane already show Codex usage percents and reset times.
Proposed solution
1. Surface banked-reset count per Codex account
- Extend the
account/rateLimits/readRPC response parser incodex-fetcher.tsto read thecreditsand newbankedResets/availableResetsfields. - Add a
bankedResets?: numberfield toProviderRateLimitsinrate-limit-types.ts. - Display the count in the status bar usage item and the usage overview pane — e.g., "1 reset available" next to the 5h/weekly percentages.
- The number should update on each poll cycle (15m default) just like existing usage data, and be per-account via the existing
inactiveCodexCache.
2. Trigger a banked reset from Orca
- Add a new JSON-RPC method
account/rateLimits/reset(or whatever the official method name ends up being) to the codex-fetcher to consume one banked reset. - Add a "Reset now" button in the usage overview pane and/or the Codex account switcher dropdown. Only show it when
bankedResets > 0. - Button click triggers the RPC call, refreshes rate limits, and updates UI.
- Working state (spinner / disabled) and error handling mirror Orca's existing patterns.
3. Multi-account support
Since Orca supports multiple Codex managed accounts with isolated CODEX_HOME directories, each account may have a different banked-reset balance. The per-account switching already re-fetches rate limits on selection change — the banked-reset count should follow the same pattern.
Alternatives or additional context
- Workaround today: Open Codex desktop app > Profile > usage summary > click "1 reset available". For users with multiple Orca-managed Codex accounts this means switching contexts repeatedly.
- Third-party tools: Tools like SessionWatcher and codex-usage-monitor read the same RPC endpoint but are read-only — they don't trigger resets.
- API maturity: The banking feature is brand new (June 11, 2026). It currently requires the Codex desktop app to trigger a reset — the app-server RPC method may not be documented yet. Orca should still instrument the fetch side now and add the trigger endpoint once the RPC method stabilizes. The OpenAI dev docs mention
credits,planType, andrateLimitReachedTypein theaccount/rateLimits/readresponse shape — thebankedResetsfield likely follows the same pattern.
Research sources
- OpenAI: Codex Release Notes — rate-limit reset banking (help.openai.com)
- OpenAI: Using Codex with your ChatGPT plan — banked resets (help.openai.com)
- Codex Developer Docs — app-server account/rateLimits/read (developers.openai.com/codex/app-server)
- OpenAI announcement (X), June 12, 2026
- OpenAI/codex issue Carry an agent's first prompt on its command line instead of pasting it (step 3 of 7) #24080 — expose rate-limit fields as status_line tokens
- AiPedia: Codex app 26.609 changelog
- Pasquale Pillitteri: Codex bankable resets deep-dive
Activity