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:

  1. per-host auth isolation (VS Code / Insiders / CLI / app),
  2. per-profile auth isolation,
  3. 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

View original on GitHub ↗

11 Comments

github-actions[bot] contributor · 5 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #12019

Powered by Codex Action

mahnunchik · 5 months ago

Of course it is duplicate!

quantuminformation · 4 months ago

yeh we need this, closing my issue

claell · 4 months ago

Also see #4432

topemalheiro · 3 months ago

Please do automatic switching too! 🙏

guidedways contributor · 2 months ago

This is much needed indeed

DavidJGrimsley · 1 month ago

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 · 1 month ago

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:

$ aistat switch codex --to work
switched to work@example.com (uuid 5e9c1a47-3b8f-42d1-a6e0-7c2f9b4d8e13); was personal@example.com

It also reports usage across stored Codex (and Claude) accounts:

$ aistat -h
Claude usage
- personal@example.com (active) [Max 5x]
  - 5-hour: 92.0% (resets in 4h 53m)
  - 7-day: 71.0% (resets in 2d 5h)
- work@example.com [Max 20x]
  - 5-hour: 4.0% (resets in 4h 12m)
  - 7-day: 12.0% (resets in 5d 9h)

Codex usage
- personal@example.com (active) [Pro]
  - 5-hour: 85.0% (resets in 1h 22m)
  - 7-day: 41.0% (resets in 4d 18h)
- work@example.com [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.

https://github.com/drogers0/aistat

haguezoum · 1 month ago

I have the same problem on macOS.

I use two OpenAI accounts:

  • Organization account: used with Codex CLI
  • Personal account: used with the Codex desktop app

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.

maximkrouk · 5 days ago

Came up with the following solution for macOS:

  1. Create supporting directories for a second profile:
mkdir -p \
  "$HOME/.codex-work" \
  "$HOME/Library/Application Support/codex-work"
  1. Create a script-command in Raycast to open codex as
open -n\
	--env "CODEX_HOME=$HOME/.codex-work"\
	--env "CODEX_ELECTRON_USER_DATA_PATH=$HOME/Library/Application Support/codex-work"\
	"/Applications/ChatGPT.app"\
	--args "--user-data-dir=$HOME/Library/Application Support/codex-work"

This 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" />

[!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_
sovetski · 3 days ago

any official solution here? You are Codex owner so 1 prompt to fix this should be fine 😄