Ability to use more than one account
Open 💬 11 comments Opened Feb 17, 2026 by mahnunchik
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
What variant of Codex are you using?
VS Code ext
What feature would you like to see?
Sharing auth across all Codex surfaces is a blocker for real-world use.
A lot of us must use two accounts on one machine:
- personal
- corporate (separate org/policies/billing)
Current design makes that impossible!
Please add one of:
- per-host auth isolation (VS Code / Insiders / CLI / app),
- per-profile auth isolation,
- explicit auth store override in extension settings.
Without this, users are forced into OS-level account switching or separate machines, which is not acceptable UX.
Additional information
Original bug report and discussion: https://github.com/openai/codex/issues/12019
11 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Of course it is duplicate!
yeh we need this, closing my issue
Also see #4432
Please do automatic switching too! 🙏
This is much needed indeed
Yes please add support for switching accounts under the same auth. I thought that was going to be the benefit of using the same account for personal and business but I have to sign all the way out. I should be able to use my personal account in one window and the business account in another window - be it Codex desktop app or VS Code Extension. Please and thank you!
Scope note up front: the VS Code extension's auth store is its own thing, so
~/.codex/auth.jsonwork won't affect the extension session.For the CLI half of the "one machine, two accounts, Codex + Claude" case mentioned here, I built
aistat, which rewrites the live~/.codex/auth.jsonin place; the CLI plus any~/.codex/-respecting tooling pick it up on next launch:It also reports usage across stored Codex (and Claude) accounts:
It doesn't solve per-host isolation (extension vs Insiders vs CLI vs app); that needs a per-host auth store in each surface. The same binary also handles Claude switching.
https://github.com/drogers0/aistat
I have the same problem on macOS.
I use two OpenAI accounts:
When I sign in to the organization account through
codex login, the Codex desktop app using my personal account starts showing an “access token was invalid” error. It appears that the CLI and desktop app share or overwrite the same authentication state.I would like Codex to support separate named accounts or profiles, for example:
Both accounts should remain authenticated and usable simultaneously without overwriting or invalidating each other’s tokens.
Possible solutions could include per-application authentication, named account profiles, or an account selector in the Codex desktop app and CLI.
Came up with the following solution for macOS:
Raycastto open codex asThis won't allow you to switch between 2 instances using script command
<img width="862" height="201" alt="Image" src="https://github.com/user-attachments/assets/f7fa19cd-458b-44ce-8d59-a387c0369d69" />
But it's pretty convenient that for some reason it displays different icons in the dock or
cmd+tab<img width="150" height="166" alt="Image" src="https://github.com/user-attachments/assets/8b498b14-337d-4e96-bbe2-097060819930" />
any official solution here? You are Codex owner so 1 prompt to fix this should be fine 😄