Feature: Multi-account ChatGPT OAuth rotation and management
Open 💬 11 comments Opened Jan 22, 2026 by jroth1111
💡 Likely answer: A maintainer (etraut-openai, contributor)
responded on this thread — see the highlighted reply below.
What feature would you like to see?
Today Codex only stores a single ChatGPT OAuth credential. I’d like multi‑account support with automatic rotation so requests can fail over when one account hits rate limits or auth failures.
Concretely:
- Persist multiple ChatGPT OAuth accounts in the local auth store.
- Add an automatic rotation strategy for OpenAI requests that:
- skips accounts in cooldown/exhausted states,
- refreshes once on 401/403 and retries the same account,
- honors Retry‑After on 429 before trying the next account,
- retries network/timeout/build errors on the same account before rotating.
- Provide CLI workflows to list/remove accounts (e.g.,
codex login accounts,codex logout --account,codex logout --all-accounts). - Surface a compact rotation/health summary in the TUI status view.
- Allow tuning via config (cooldowns, network retries, max attempts).
Additional information
Motivation: power users hit rate limits and auth refresh issues that interrupt long sessions. Rotation + account management would improve reliability without forcing API key usage. I have a draft implementation on a feature branch (oauth-marathon) and can iterate based on maintainer feedback.
11 Comments
Thanks for the suggestion.
This feature request largely overlaps #3366 which already has some upvotes. I'm going to close this one to consolidate. Feel free to add ideas to the other one if you think that it doesn't quite capture what you have in mind.
Thanks for the response. I don’t think this is a duplicate of #3366: that issue focuses on re‑auth/entering a new credential after plan‑limit termination within the same session, whereas this proposal is automatic multi‑account rotation + storage (rate‑limit/auth failure handling, per‑account cooldowns, CLI account management, TUI summary, config controls). If you prefer consolidation, I can move the full details into #3366, but I believe the scope is materially different. Would you consider reopening so it can be tracked separately?
For visibility: the implementation in PR #9651 is ready to go (tests passing). I’m disappointed it can’t be included under the current feature freeze, but I understand the policy. If/when this enhancement is green‑lit, the PR is available as a starting point, and I can fold any additional feedback into it.
I agree 100% of this featue.
I need to add my openai account and failover to api when tokens are consumed or rate limited.
@bechti44, you also now have the option of purchasing more credits that can be applied to your subscription. That capability was introduced a few months ago. I mention it in case you weren't aware of the option.
The credit system doesn't not seem to be well received by the community, thus why I proposed this feature to buy multiple accounts.
https://community.openai.com/t/codex-using-up-massive-credits-850-credits-5-hour-limit-used-on-only-8-queries/1364774
I bought another pro account simply because I think a $200 credit doesn’t equal to pro usage.
Is that wrong? Codex really uses the credit quickly.
aiswhandles multi-account storage and manual switching. What it intentionally doesn't do is auto-rotation/failover. No quota checking, no network calls. You decide when to switch.Also works for Claude Code and Gemini CLI. https://github.com/burakdede/aisw
It's not very clear if this is even allowed by OpenAI. Isn't this technically circumventing limits/restrictions?
Prior art for the rotation spec here: I built
aistat, which ships much of this pattern (multi-account OAuth store,Retry-After-aware HTTP, a per-account usage cache, and auto-pick by remaining 5h headroom on switch) — Claude side today, Codex side on the same machinery:The reporting side shows where each account sits, which is what auto-pick reads:
Two notes that might shorten PR #9651 review:
https://github.com/drogers0/aistat — rotation in
internal/providers/claude/reconcile.go, Retry-After ininternal/httpx/. Credential-store-rather-than-fetch-rotation design, so applicable as a tradeoffs data point rather than copy-paste.My personal Codex symphony implementation + multi-account management + usage load balance
https://github.com/hack-ink/decodex
https://x.com/hackink/status/2054951370177057224
https://x.com/hackink/status/2056903691211530666
<img width="501" height="1200" alt="Image" src="https://github.com/user-attachments/assets/245654e6-037d-4c3e-8735-31c1563e1655" />