Skip to content

Ability to use more than one account #12029

Open

Description

@mahnunchik

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: #12019

Activity

  1. added
    enhancement
    on Feb 17, 2026
  2. added
    extension
    auth
    on Feb 17, 2026
  3. github-actions commented on Feb 17, 2026

    @github-actions
    Contributor

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

    Powered by Codex Action

  4. mahnunchik commented on Feb 17, 2026

    @mahnunchik
    Author

    Of course it is duplicate!

  5. quantuminformation commented on Mar 4, 2026

    @quantuminformation

    yeh we need this, closing my issue

  6. claell commented on Mar 13, 2026

    @claell

    Also see #4432

  7. topemalheiro commented on Apr 10, 2026

    @topemalheiro

    Please do automatic switching too! 🙏

  8. guidedways commented on Apr 24, 2026

    @guidedways
    Contributor

    This is much needed indeed

  9. DavidJGrimsley commented on May 26, 2026

    @DavidJGrimsley

    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!

  10. drogers0 commented on Jun 3, 2026

    @drogers0

    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 [email protected] (uuid 5e9c1a47-3b8f-42d1-a6e0-7c2f9b4d8e13); was [email protected]

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

    $ aistat -h
    Claude 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.

    https://github.com/drogers0/aistat

  11. haguezoum commented on Jun 9, 2026

    @haguezoum

    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.

  12. maximkrouk commented on Jul 15, 2026

    @maximkrouk

    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
    Image

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

    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

  13. sovetski commented on Jul 17, 2026

    @sovetski

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

  14. stevesolun commented on Aug 3, 2026

    @stevesolun

    @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.

  15. fopinappb commented on Nov 19, 2026

    @fopinappb

    Can we add mobile apps to the request? 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    authenhancementextension

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions