VS Code Remote-SSH: API-key session invalidates ChatGPT Business OAuth session
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- vscode
- Domain
- authentication
Research direction
Start by reproducing the issue with two VS Code windows and profiles connected to the same Remote-SSH host, using ChatGPT Business OAuth in one and API-key authentication in the other. Inspect the Codex VS Code extension logs and remote extension-host authentication state. Done means the two sessions retain independent credentials, or the supported limitation and workaround are documented.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.5k
- Avg merge
- 1m
- Merged PRs (30d)
- 1k
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from openai/codex
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
bug CLI windows-os
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
macOS sandbox blocks hw.optional.arm64 sysctl, causing Flutter to misdetect Apple Silicon as x64 Openbug CLI sandbox
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug CLI TUI
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
CLI config enhancement skills
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
A-linter
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
oxc-project/oxc#26863 ·