Repository navigation
Description
Feature hasn't been suggested before.
- I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Context
I'm aware of previous requests for this feature (#8591, #9068, #11830)
but none received maintainer feedback. I'm opening this one because
I have a working implementation ready.
Problem
Currently, /connect overwrites the previous OpenAI account every time it's used.
There is no way to have multiple ChatGPT accounts connected simultaneously.
This is a significant limitation for users who manage several accounts and want to
distribute usage across them without manually reconnecting every time.
Scope
This implementation is OpenAI-only — specifically for users running
ChatGPT Plus with Codex quota. No generic multi-provider abstraction,
no over-engineering. Just the problem I actually had.
Proposed Solution
We implemented a multi-account pool for OpenAI in a fork. The approach is minimal,
backwards compatible, and OpenAI-specific (no over-engineered generic abstraction).
What We Built
/connectnow accumulates accounts instead of overwriting — each new login adds
a new entry to the pool/account list— shows all connected accounts with email and status (enabled/disabled/active)/account use— interactive picker with arrow keys + Enter to switch active account/account disable— interactive picker to disable an account from the pool/account remove— interactive picker to remove an account from the pool- Visual indicator in the TUI showing the active account email next to the model indicator
- Full backwards compatibility with existing single-account
auth.jsonformat —
existing users are not affected
Technical Approach
- Extended
auth.jsonwith anaccounts[]array under the OpenAI key - Old single-account format is auto-migrated on first read
/accountcommands are local TUI commands, not model prompts- Token refresh updates only the selected account entry, never touches others
- New backend endpoints:
GET/DELETE/POST /provider/openai/account/...
Status
We have a working fork validated on Windows 11. All features above are functional.
Fork
https://github.com/lNimien/opencode
Question for Maintainers
Would you be interested in a PR for this? If so, do you have preferences on:
- The storage approach (
auth.jsonextension vs separate file) - Whether session affinity (pinning a session to a specific account) should be
included in the same PR or as a follow-up - Any specific test coverage requirements
Happy to polish and submit a proper PR if there's interest.
Activity
github-actions commentedon Apr 21, 2026
This issue might be a duplicate of existing issues. Please check:
You also mentioned #8591, #9068 in your issue — those are closed, but the open ones above are still active. Please review these and consider whether your request overlaps, or add context in this issue explaining how it differs.
KaramTNC commentedon May 26, 2026
Im interested in this, perhaps open a PR so they can approve it?
lNimien commentedon May 26, 2026
I was using this on version 1.14.50, so my branch already has it merged.
If you want, you can create the PR using my code/fork. Just credit me for the original implementation, and you can maintain the PR from there.
I won’t open the PR myself since I don’t need this anymore.
github-actions commentedon Jul 26, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.