You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unable to authenticate Codex extension in Visual Studio Code when WSL is enabled #6413
authIssues related to authentication and accountsbugSomething isn't workingextensionIssues related to the VS Code extensionwindows-osIssues related to Codex on Windows systems
In Visual Studio Code, when enabling "Run Codex In Windows Subsystem For Linux" (WSL) I cannot sign into my ChatGPT account (using Google account) to authenticate. It gives the error: Token exchange failed: error sending request for url (https://auth.openai.com/oauth/token)
What steps can reproduce the bug?
Turn on "Run Codex In Windows Subsystem For Linux" in extension settings
Try to sign in
Use Google account as sign in
FAIL
What is the expected behavior?
Expect to sign in and authenticate as it does when WSL is not enabled.
I’m seeing the same behavior in my VS Code extension environment.
It starts occurring from v0.4.37 and does not reproduce on v0.4.35 (downgrading to 0.4.35 works around the problem).
Environment:
VS Code: 1.105.1
OS (Host): Windows 11
Node (Windows): v24.11.0
WSL: 2.6.1.0
OS (WSL): Ubuntu 22.04.5
Node (WSL): v22.21.0
I can share additional logs or reproduction details if helpful.
@cpthgli@Fleating could you try running rm ~/.codex/auth.json in WSL? And then restarting VS Code. We've seen a number of reports about this on different platforms. Would help to isolate the root cause as we investigate
I am having this issue ever since I hit "yes" on "Reboot VS Code into WSL Mode".
There is no auth.json file in WSL and I deleted that file in my native Windows 11 setup.
I cannot get the localhost callback to hit VS Code at all, whether I am in WSL or not.
authIssues related to authentication and accountsbugSomething isn't workingextensionIssues related to the VS Code extensionwindows-osIssues related to Codex on Windows systems
Activity
github-actions commentedon Nov 9, 2025
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
cpthgli commentedon Nov 11, 2025
I’m seeing the same behavior in my VS Code extension environment.
It starts occurring from v0.4.37 and does not reproduce on v0.4.35 (downgrading to 0.4.35 works around the problem).
Environment:
I can share additional logs or reproduction details if helpful.
dylan-hurd-oai commentedon Nov 11, 2025
@cpthgli @Fleating could you try running
rm ~/.codex/auth.jsonin WSL? And then restarting VS Code. We've seen a number of reports about this on different platforms. Would help to isolate the root cause as we investigatecraighooghiem commentedon Nov 12, 2025
I am having this issue ever since I hit "yes" on "Reboot VS Code into WSL Mode".
There is no auth.json file in WSL and I deleted that file in my native Windows 11 setup.
I cannot get the localhost callback to hit VS Code at all, whether I am in WSL or not.
etraut-openai commentedon Nov 14, 2025
Closing in favor of #4562
MaeseppTarvo commentedon Mar 30, 2026
rm ~/.codex/auth.json is only thing that is really the fastest solution to continue your work! Seems like Codex is new Swift/Xcode