Skip to content

[Windows][Desktop] Sign-in fails with "workspace routing discovery timed out" (no CODEX_CLI_PATH or external runtime) #50828

Open

Description

@seanyi0104

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

Can't open the About dialog because the app never gets past the sign-in screen. Microsoft Store build (OpenAI.Codex), no updates available as of 4 Oct 2026.

What subscription do you have?

Personal ChatGPT account

What platform is your computer?

Windows 11

What issue are you seeing?

The desktop app can't get past the sign-in screen. The browser part of sign-in succeeds and says I can close the tab, but back in the app sign-in fails with:

workspace routing discovery timed out

It happens on every retry. It worked fine until 4 Oct 2026, and the same account works normally on chatgpt.com.

This matches the sign-in failure BochengYao described in #46382, but that issue was closed by its author after their own case turned out to be a CODEX_CLI_PATH override. My setup has no override or external runtime:

  • CODEX_CLI_PATH is not set at User or Machine scope
  • No codex on PATH, npm ls -g @openai/codex is empty, and there's no ~/.codex/packages/standalone

So the app should be using its bundled runtime.

What steps can reproduce the bug?

  1. Open the ChatGPT desktop app (Microsoft Store version) on Windows 11.
  2. Start sign-in and complete it in the browser with Google.
  3. The browser confirms sign-in.
  4. Back in the app, sign-in fails with workspace routing discovery timed out and the app stays on the sign-in screen.

What is the expected behavior?

Sign-in should complete and the app should open normally, as it did before 4 Oct. If routing discovery fails, the app should show an actionable error instead of a timeout.

Additional information

Activity

  1. added
    app
    on Oct 4, 2026
  2. added
    bug
    windows-os
    auth
    connectivity
    on Oct 4, 2026
  3. github-actions commented on Oct 4, 2026

    @github-actions
    Contributor
  4. seanyi0104 commented on Oct 4, 2026

    @seanyi0104
    Author

    Potential duplicates detected. Please review them and close your issue if it is a duplicate.检测到可能重复的问题。请核实并关闭您的问题。

    Powered by Codex Action由 Codex Action 提供支持

    Thanks for the pointers. #49921 shows the same error, but there it's triggered by a local proxy that isn't passed to the bundled runtime (fixed by setting HTTP_PROXY/HTTPS_PROXY). I'm not using any proxy or VPN, so this looks like a different trigger on Windows. Leaving this open unless maintainers think otherwise.

  5. Askir-Deioy commented on Oct 9, 2026

    @Askir-Deioy

    I can reproduce this issue on Windows 10 with Codex Desktop package version 26.1002.7124.0.

    Browser authentication completes successfully, and codex.exe login status reports Logged in using ChatGPT. However, the Desktop app cannot initialize the workspace.

    Desktop logs:

    • Workspace routing is unavailable (status 432)
    • Affected routes: /settings/user, /wham/usage
    • Additional HTTP 401 errors in remote_connections

    CLI reproduction:

    Using the bundled codex.exe with --no-daemon produces:

    account/read failed during TUI bootstrap:
    account/read failed: workspace routing discovery failed (code -32603)
    

    Troubleshooting performed:

    • Updated Codex Desktop to 26.1002.7124.0
    • Confirmed CODEX_CLI_PATH is unset at both User and Machine levels
    • Completed browser authentication successfully
    • Tested with Clash Verge TUN and system proxy disabled
    • Retried CLI with an explicit log_dir configuration
    • All attempts failed with the same workspace routing error

    This affects both Desktop and the bundled CLI, even though the CLI reports an authenticated ChatGPT session.

    Could the team investigate workspace routing discovery during account/read? I would also appreciate a supported workaround that preserves existing local sessions and configuration.

  6. zpeoo commented on Oct 9, 2026

    @zpeoo

    有解决方案吗?我今天也遇到了相同的问题

  7. Askir-Deioy commented on Oct 9, 2026

    @Askir-Deioy
  8. mehrshadmollaafzal commented on Oct 20, 2026

    @mehrshadmollaafzal

    Potential workaround: sign out old ChatGPT sessions

    I hit a very similar workspace-routing sign-in failure on Windows on 2026-10-20 and was able to get Codex Desktop working again after signing out of many existing ChatGPT sessions via ChatGPT Settings → Security → Sessions.

    Environment

    • Codex Desktop Microsoft Store package: OpenAI.Codex 26.1013.4894.0
    • Separate CLI: codex-cli 0.161.0
    • ChatGPT Plus sign-in
    • No actively configured VPN or system proxy; CODEX_CLI_PATH unset at User and Machine scope

    Symptoms

    • Desktop sign-in: Sign-in failed: workspace routing discovery failed
    • codex login status returned Logged in using ChatGPT
    • codex --no-daemon failed at TUI bootstrap:
      account/read failed during TUI bootstrap:
      account/read failed: workspace routing discovery failed (code -32603)
      
    • During another sign-in attempt, the authentication page displayed Unexpected token '<', '<!DOCTYPE' ... is not valid JSON.

    Things that did not help

    • Completely uninstalling and reinstalling Codex Desktop
    • Trying a different network (phone hotspot)
    • Retrying the sign-in flow
    • Checking proxy settings (no active Windows system proxy or proxy environment variables)

    What worked

    1. Open ChatGPT in the browser.
    2. Go to Settings → Security → Sessions.
    3. Sign out of numerous older/existing sessions.
    4. Retry Codex Desktop: the sign-in/workspace issue was resolved.

    I did not isolate which particular session (if any) caused the failure, nor establish whether the number of sessions itself was responsible. It may have been an account/session-state refresh triggered by the sign-outs. This is one successful user observation, not a confirmed root cause or universal fix. Sharing in case it helps others reproduce or diagnose the workspace-routing issue.

  9. Askir-Deioy commented on Oct 22, 2026

    @Askir-Deioy

    Update: What eventually worked for me (Windows 10, Codex Desktop + CLI, proxy environment)

    I'm the user who reported the same issue here on October 9.

    After a rather painful troubleshooting journey involving HTTP 401/432, workspace routing errors, OAuth failures, CLI problems, and multiple reinstalls, I eventually got Codex working again.

    I wanted to share the steps and observations that helped me. This is my personal experience, not a universal fix. I still cannot confirm the exact root cause of the original Desktop issue.

    1. Check your upstream network or proxy provider first

    If you're using a VPN, proxy service, mobile hotspot, or another network provider, check whether your connection is being throttled or experiencing unusual latency or packet loss.

    You may want to contact your upstream provider and ask about server congestion or speed restrictions.

    In my case, I was using a mobile hotspot that had been throttled after exhausting its data allowance. My mobile plan renewed around the time Codex Desktop recovered.

    However, I cannot prove this caused the recovery. I had also tested other networks, so the timing might have been coincidental.

    2. If you use Anaconda, check SSL certificate environment variables

    This was one of the most useful discoveries in my case.

    My PowerShell environment contained:

    SSL_CERT_FILE=D:\anconda\Library\ssl\cacert.pem

    It was set at the Process level, while the Windows User and Machine values were empty.

    Codex CLI sometimes failed with:

    Token exchange failed:
    error sending request for url (https://auth.openai.com/oauth/token)
    

    You can check your current PowerShell environment with:

    $env:SSL_CERT_FILE

    And temporarily remove that variable with:

    Remove-Item Env:\SSL_CERT_FILE -ErrorAction SilentlyContinue

    This does not delete Anaconda's certificate file or modify the permanent Windows environment settings.

    After temporarily removing this variable, my CLI successfully completed OAuth authentication and could actually respond to prompts.

    Interestingly, I later encountered workspace routing discovery failed (code -32603) again, and removing SSL_CERT_FILE allowed the CLI to start successfully again.

    I eventually configured my PowerShell environment to stop reintroducing this variable.

    If you use Anaconda, I strongly recommend checking this before reinstalling anything. You can also ask an AI assistant to help inspect your environment variables safely.

    I cannot confirm that this caused every earlier HTTP 401/432 error, but the improvement in CLI behavior was repeatable on my machine.

    3. Use a dedicated proxy-configured browser for CLI authentication

    This step is especially relevant if your network requires a proxy.

    In my case, I used Clash Verge with a local SOCKS5 proxy at:

    127.0.0.1:7897
    

    7897 was my local proxy port. Yours may be different.

    I configured a separate Microsoft Edge browser profile/instance specifically for authentication, with outbound internet traffic routed through my local proxy.

    My goal was a fail-closed proxy setup: if the proxy became unavailable, external traffic should fail instead of silently falling back to a direct connection.

    Be careful here: simply setting a browser proxy does not automatically guarantee fail-closed behavior. You should verify the actual routing and apply appropriate firewall or network rules if preventing direct external connections is important to you.

    Also, remember that Codex's OAuth process uses a local localhost / 127.0.0.1 callback. Local loopback communication must remain accessible, even when external direct connections are blocked.

    I then used PowerShell to perform CLI authentication instead of relying on the Desktop app's login button.

    First:

    codex logout

    Then, with my required proxy/TUN configuration active:

    codex login

    I copied the generated authorization URL and opened it in my dedicated browser.

    During my troubleshooting, the first attempt sometimes failed, while another attempt succeeded without changing anything. I also occasionally saw a browser error involving 127.0.0.1, even though the terminal indicated successful login.

    Do not assume a localhost error is harmless. Check whether Codex actually completed authentication:

    codex login status

    The result I was looking for was:

    Logged in using ChatGPT
    

    Once authenticated, I tested the CLI:

    codex --no-daemon --cd "$env:TEMP" --sandbox read-only

    In my earlier tests, the first launch occasionally failed during account/read, while the second succeeded. This was intermittent behavior I observed, not something I can guarantee for other installations.

    When it worked, I sent a simple prompt and received a normal model response.

    At that point, I had verified that the account could authenticate, initialize a workspace through the CLI, and actually use a model in that environment.

    That was useful evidence that the problem was not a total loss of Codex access on my account. However, it did not completely rule out account-side or Desktop-specific issues.

    4. Back up your conversations, then consider a clean reinstall

    Only consider this after less destructive troubleshooting has failed.

    I used the working CLI to inspect and preserve local data. You can also back up your conversations and configuration using another trusted method.

    Important locations may include:

    %USERPROFILE%\.codex
    %LOCALAPPDATA%\OpenAI\Codex
    

    There are also Codex application-package data directories on Windows.

    Back up your conversation history, MCP configuration, and any other important settings before making changes.

    I eventually:

    1. Fully closed Codex Desktop and CLI.
    2. Uninstalled the Codex Windows application.
    3. Renamed and isolated the old Codex configuration and caches.
    4. Installed a fresh official Codex Desktop build.
    5. Tested without restoring my old configuration.

    A clean reinstall did not immediately fix the original workspace-routing failure in my case, so please don't assume it will solve yours.

    5. Configure proxy environment variables for Codex, then authenticate through PowerShell

    Another important part of my final setup was making sure Codex had explicit proxy configuration instead of depending entirely on Windows system proxy behavior.

    For example, if your environment uses a SOCKS5 proxy, the relevant variables may include:

    ALL_PROXY=socks5h://127.0.0.1:7897
    NO_PROXY=localhost,127.0.0.1,::1

    Here, socks5h indicates SOCKS5 with hostname resolution handled through the proxy.

    For setups with a separate HTTP proxy listener, HTTP_PROXY and HTTPS_PROXY can also be configured to point to the appropriate HTTP proxy port.

    Some Codex versions and setups use a .env file under the Codex home directory, usually:

    %USERPROFILE%\.codex\.env
    

    However, make sure your particular CLI/Desktop version actually loads the file and that the port is valid. Environment inheritance can differ between PowerShell, the native Desktop app, and other runtimes.

    A .env file by itself does not enforce a system-wide no-direct-connection policy.

    Once the proxy environment was configured, I used the official CLI login flow through PowerShell rather than repeatedly using the Desktop login UI.

    In my experience, after CLI authentication succeeded and the local environment was configured correctly, I was eventually able to get Desktop working as well.

    However, there was also a period when CLI worked while Desktop remained stuck on its sign-in screen. I cannot claim that successful CLI login will always fix Desktop.

    I verified recovery by opening Desktop, entering the main interface, and successfully sending actual model requests.

    My old conversations also eventually became usable again without an additional confirmed fix.

    Important precautions

    Please be careful with repeated sign-ins and proxy changes.

    • Avoid rapidly switching proxy nodes or network locations during repeated OAuth attempts.
    • Avoid unnecessary logout/login cycles once you have a working authentication state.
    • Keep your proxy listener running if Codex is configured to depend on it.
    • Check for stale proxy ports and certificate environment variables.
    • Never publish OAuth tokens, cookies, auth.json, or unredacted authentication logs.
    • Back up important data before removing local Codex state.
    • Revoke or clean up genuinely obsolete credentials using supported methods, but do not randomly delete active tokens from a working installation.

    Finally, I have not tested the workaround mentioned above involving signing out of old ChatGPT sessions, so I cannot verify whether it would have helped in my particular case.

    Final observations

    My experience suggests that several different issues can produce very similar Codex errors:

    • Network or proxy connectivity problems.
    • Custom CA certificate configuration interfering with TLS.
    • CLI and Desktop inheriting different environments.
    • OAuth and workspace initialization behaving differently.
    • Potential server-side workspace routing or session-state problems.

    The two most useful findings in my case were:

    1. Removing the Anaconda-provided SSL_CERT_FILE restored CLI functionality on more than one occasion.

    2. Carefully configuring the network/proxy environment and using PowerShell for authentication helped me reach a working setup.

    The Desktop eventually recovered, but I still cannot identify one definitive action responsible for that recovery.

    I hope this helps someone else spend less time troubleshooting and more time actually using Codex.

    Good luck! :)

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

    appauthbugconnectivitywindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions