Skip to content

Codex auth is shared between VS Code and VS Code Insiders #12019

Closed as not planned

Description

@mahnunchik

What version of the IDE extension are you using?

0.4.74

What subscription do you have?

Plus and some kind of corporate

Which IDE are you using?

VS Code and VS Code Insiders

What platform is your computer?

Darwin 24.6.0 arm64 arm

What issue are you seeing?

Codex auth is shared between VS Code and VS Code Insiders.

What steps can reproduce the bug?

  1. Log in to Codex in VS Code with account A.
  2. Log out/in in VS Code Insiders with account B.
  3. Return to VS Code.

Account/session changes in one IDE affect the other.

What is the expected behavior?

VS Code and VS Code Insiders should keep separate Codex auth sessions.

Additional information

Looks like both apps use the same auth store: ~/.codex/auth.json
Extension: openai.chatgpt https://marketplace.visualstudio.com/items?itemName=openai.chatgpt

Activity

  1. added
    bugSomething isn't working
    authIssues related to authentication and accounts
    on Feb 17, 2026
  2. etraut-openai commented on Feb 17, 2026

    @etraut-openai
    Contributor

    Yes, this is by design. Codex auth is shared among all instances of codex on your machine whether you're using the extension, CLI, or app.

  3. mahnunchik commented on Feb 17, 2026

    @mahnunchik
    Author

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

  4. etraut-openai commented on Feb 17, 2026

    @etraut-openai
    Contributor

    OK, I understand your suggestion. Please open a new feature request. We generally prioritize features based on community upvotes.

  5. etraut-openai commented on Feb 17, 2026

    @etraut-openai
    Contributor

    Here's a potential short-term workaround. You could define the CODEX_HOME environment variable to point to a location other than ~/.codex/ for one of your profiles. All of the settings (including cached auth tokens), session details, etc. are stored in the CODEX_HOME directory.

  6. mahnunchik commented on Feb 17, 2026

    @mahnunchik
    Author

    OK, I understand your suggestion. Please open a new feature request. We generally prioritize features based on community upvotes.

    I’m not sure I understand: how is a new feature request different from this issue? Should I create another one and copy the same text there?

  7. etraut-openai commented on Feb 17, 2026

    @etraut-openai
    Contributor

    You filed a bug report. Please use the feature request template.

  8. mahnunchik commented on Feb 17, 2026

    @mahnunchik
    Author
    echo "alias code-insiders='CODEX_HOME=\$HOME/.codex-insiders \"$(which code-insiders)\"'" >> ~/.zshrc
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

    authIssues related to authentication and accountsbugSomething isn't workingextensionIssues related to the VS Code extension

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions