Skip to content

Unable to authenticate Codex extension in Visual Studio Code when WSL is enabled #6413

Closed as duplicate

Description

@Fleating

What version of Codex is running?

0.4.38

What subscription do you have?

ChatGPT Plus

Which model were you using?

n/a

What platform is your computer?

Windows 11

What issue are you seeing?

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.

Additional information

No response

Activity

  1. added
    bug
    on Nov 9, 2025
  2. added
    extension
    windows-os
    auth
    on Nov 9, 2025
  3. cpthgli commented on Nov 11, 2025

    @cpthgli

    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.

  4. dylan-hurd-oai commented on Nov 11, 2025

    @dylan-hurd-oai
    Contributor

    @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

  5. craighooghiem commented on Nov 12, 2025

    @craighooghiem

    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.

  6. etraut-openai commented on Nov 14, 2025

    @etraut-openai
    Contributor

    Closing in favor of #4562

  7. MaeseppTarvo commented on Mar 30, 2026

    @MaeseppTarvo

    rm ~/.codex/auth.json is only thing that is really the fastest solution to continue your work! Seems like Codex is new Swift/Xcode

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

    authbugextensionwindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions