You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reacted by Daniil Sedov, rocky, Claudius Ellsel, Nguyễn Đình Sơn, Alex Boehm, Chris Poliquin, Thales F. Dal Molim, Kosmos, Vitaly Gashkov, Patrick Burrows and 60 more
Reacted by Nikos, António Pedro Malheiro (TóPê), betterdaylabs, DaniloCEDC, Alex Mayer, Mathias Gruber and Adriano Cahete
Reacted by António Pedro Malheiro (TóPê), Michel de Freitas, Natan Cieplinski, Cesar Muñoz Filestage, lechmazur, Jaga Santagostino, Nguyễn Đình Sơn, Dex Devlon, Chris George, auditt98 and 3 more
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!
Reacted by Nikos, Kristýna Rehovičová and Adriano Cahete
Scope note up front: the VS Code extension's auth store is its own thing, so ~/.codex/auth.json work 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.json in place; the CLI plus any ~/.codex/-respecting tooling pick it up on next launch:
It also reports usage across stored Codex (and Claude) accounts:
$ aistat -hClaude usage- [email protected] (active) [Max 5x] - 5-hour: 92.0% (resets in 4h 53m) - 7-day: 71.0% (resets in 2d 5h)- [email protected] [Max 20x] - 5-hour: 4.0% (resets in 4h 12m) - 7-day: 12.0% (resets in 5d 9h)Codex usage- [email protected] (active) [Pro] - 5-hour: 85.0% (resets in 1h 22m) - 7-day: 41.0% (resets in 4d 18h)- [email protected] [Plus] - 5-hour: 4.0% (resets in 4h 12m) - 7-day: 9.0% (resets in 5d 11h)
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.
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:
Codex CLI → Organization account
Codex desktop app → Personal account
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.
This won't allow you to switch between 2 instances using script command
But it's pretty convenient that for some reason it displays different icons in the dock or cmd+tab
Note
I also renamed ChatGPT.app back to Codex.app 😆 So if you rename it as well and then use the script for opening the app, you should replace the path to app container
Reacted by Douglas Chalegre
Reacted by António Pedro Malheiro (TóPê), Hassan Aguezoum, Aryakumar Jha and Adriano Cahete
@etraut-openai@openai-devashisht@aa-openai supposing u r from OpenAI - any updates on this issue? I also have a work and personal openai user - i want to switch smoothly with different payment methods.
Activity
github-actions commentedon Feb 17, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
mahnunchik commentedon Feb 17, 2026
Of course it is duplicate!
quantuminformation commentedon Mar 4, 2026
yeh we need this, closing my issue
claell commentedon Mar 13, 2026
Also see #4432
topemalheiro commentedon Apr 10, 2026
Please do automatic switching too! 🙏
guidedways commentedon Apr 24, 2026
This is much needed indeed
DavidJGrimsley commentedon May 26, 2026
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!
drogers0 commentedon Jun 3, 2026
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
haguezoum commentedon Jun 9, 2026
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.
maximkrouk commentedon Jul 15, 2026
Came up with the following solution for macOS:
Raycastto open codex asThis won't allow you to switch between 2 instances using script command

But it's pretty convenient that for some reason it displays different icons in the dock or

cmd+tabNote
I also renamed ChatGPT.app back to Codex.app 😆
So if you rename it as well and then use the script for opening the app, you should replace the path to app container
sovetski commentedon Jul 17, 2026
any official solution here? You are Codex owner so 1 prompt to fix this should be fine 😄
stevesolun commentedon Aug 3, 2026
@etraut-openai @openai-devashisht @aa-openai supposing u r from OpenAI - any updates on this issue? I also have a work and personal openai user - i want to switch smoothly with different payment methods.
fopinappb commentedon Nov 19, 2026
Can we add mobile apps to the request? 🙏