VS Code Remote-SSH: API-key session invalidates ChatGPT Business OAuth session

Open 💬 0 comments Opened Aug 8, 2026 by jennya2a

What version of the Codex App are you using (From “About Codex” dialog)?

N/A — I am using the Codex VS Code extension over Remote-SSH, not the Codex desktop app.

What subscription do you have?

Your access token could not be refreshed because you have since logged out or signed in to another account. Please sign in again.

What platform is your computer?

_No response_

What issue are you seeing?

I would like to report a reproducible Codex VS Code Remote-SSH authentication bug. Using API-key authentication in one VS Code profile invalidates the ChatGPT Business OAuth refresh token in another profile when both connect to the same Remote-SSH host.

Hello OpenAI Support,

I would like to report a reproducible authentication issue with the Codex VS Code extension when using VS Code Remote-SSH.

Environment

VS Code running on a local Windows machine
VS Code Remote-SSH connecting to a remote Linux GPU server
Codex VS Code extension
Developer: Show Running Extensions confirms that Codex is running on the SSH remote extension host
Two separate VS Code windows
Two separate VS Code profiles
Both profiles connect to the same remote Linux host
Profile A / Project A: Sign in with ChatGPT → ChatGPT Business
Profile B / Project B: OpenAI API-key authentication

Expected behavior

I would like to run two independent Codex sessions concurrently:

Project A → ChatGPT Business authentication and Business Codex quota
Project B → OpenAI API key and API billing

Authentication in one VS Code profile/window should not invalidate authentication in the other profile/window.

Actual behavior

ChatGPT Business authentication initially succeeds in Profile A.

I can open Codex and use the Business account successfully.

I then open another VS Code window, connect via Remote-SSH to the same Linux host, switch to the separate API profile, and run Codex using API-key authentication.

The API-key Codex session works correctly and can execute long-running tasks.

However, when I return to the Business Codex session, it fails with:

Your access token could not be refreshed because you have since logged out or signed in to another account. Please sign in again.

Signing into the Business account again can temporarily restore access, but using the API-key Codex environment causes the Business OAuth session to become invalid again.

What steps can reproduce the bug?

Steps to reproduce

Start VS Code locally.
Connect to a Linux machine using Remote-SSH.
Use VS Code Profile A.
Open Project A.
Open the Codex extension.
Choose Sign in with ChatGPT.
Sign into a ChatGPT Business account.
Verify that Business Codex works.
Open a second VS Code window.
Connect via Remote-SSH to the same Linux host.
Switch the second window to VS Code Profile B.
Open Project B.
Use Codex with OpenAI API-key authentication.
Verify that the API-key Codex session works.
Return to Profile A / Project A.
Send another Codex request.
The Business session fails because its access token can no longer be refreshed.

Additional observation

Creating separate VS Code profiles does not appear to fully isolate the authentication state when Codex runs on the same Remote-SSH extension host.

This suggests that the remote Codex extension may be sharing authentication/credential state across VS Code profiles or remote sessions.

Importantly, the ChatGPT Business account worked normally before I started switching between Business OAuth and API-key authentication. The issue appeared after using the two authentication methods on the same Remote-SSH host.

Requested behavior

It would be very useful if Codex supported independent authentication contexts on the same Remote-SSH host, for example:

VS Code Profile A → Project A → ChatGPT Business OAuth

VS Code Profile B → Project B → OpenAI API key

These sessions should be able to run concurrently without invalidating each other's credentials or refresh tokens.

If this configuration is currently unsupported by design, please clarify the supported method for running a ChatGPT Business Codex session and an API-key Codex session concurrently against the same Remote-SSH development host.

I can provide extension logs, version information, and additional reproduction details if needed.

Thank you.

What is the expected behavior?

_No response_

Additional information

_No response_

View original on GitHub ↗