Codex auth is shared between VS Code and VS Code Insiders

Resolved 💬 8 comments Opened Feb 17, 2026 by mahnunchik Closed Feb 17, 2026
💡 Likely answer: A maintainer (etraut-openai, contributor) responded on this thread — see the highlighted reply below.

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

View original on GitHub ↗

8 Comments

etraut-openai contributor · 5 months ago

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.

mahnunchik · 5 months ago

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

etraut-openai contributor · 5 months ago

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

etraut-openai contributor · 5 months ago

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.

mahnunchik · 5 months ago
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?

etraut-openai contributor · 5 months ago

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

mahnunchik · 5 months ago
echo "alias code-insiders='CODEX_HOME=\$HOME/.codex-insiders \"$(which code-insiders)\"'" >> ~/.zshrc