Skip to content

[Windows Desktop 26.1007.2314.0] OAuth login failure and persistent workspace routing timeouts after Oct 10 update #53261

Open

Description

@HTTNH

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

OpenAI.Codex 26.1007.2314.0

What subscription do you have?

GPT Plus

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

What issue are you seeing?

After an apparent Codex Desktop update around October 10, 2026, the Windows application began failing to complete ChatGPT authentication.

The login interface displays the following error:

Sign-in could not be completed

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

Error code: token_exchange_failed

Before this update, I had been using Codex with a TUN-based global proxy configuration without authentication problems. Occasional network instability previously caused interrupted responses, but did not cause login failures or repeated sign-outs.

Since the update, I have observed:

  • Codex Desktop cannot reliably complete the ChatGPT OAuth login process.

  • Repeated workspace routing discovery timeouts in the application logs.

  • Multiple HTTP 432 responses with Workspace routing is unavailable.

  • The ChatGPT desktop application unexpectedly requires authentication again after Windows restarts. This occurred after two separate restarts and was not previously observed.

  • ChatGPT remains accessible through a web browser, although response performance is sometimes slow.

The installed package version is OpenAI.Codex 26.1007.2314.0.

Diagnostic logs collected over the most recent three days contain:

Log pattern Occurrences
workspace routing discovery timed out 20
Workspace routing is unavailable 22
status=432 23
account/read 88
CRYPT_E_REVOCATION_OFFLINE 0
certificate verify failed 0

These are keyword occurrence counts, not necessarily distinct failures. In particular, the account/read count includes all matching log entries, not exclusively errors.

The token_exchange_failed message is displayed in the login UI, but that exact string was not found in the inspected application log files.

The onset closely coincides with the application update. However, I cannot yet determine whether the underlying cause is an application regression, changed proxy handling, authentication/workspace routing behavior, or a combination of these factors.

What steps can reproduce the bug?

The bug could be reproduced by simply restart the computer and then open Codex (ChatGPT) again. Detailed steps are shown below:

  1. Run Codex Desktop for Windows, version 26.1007.2314.0.
  2. Use a local proxy application with TUN mode and global routing enabled, which previously worked consistently.
  3. Launch Codex Desktop and attempt to sign in using an existing ChatGPT account.
  4. Complete the browser-based authentication flow and return to Codex.
  5. Observe the token_exchange_failed error during OAuth token exchange.
  6. Inspect the local Codex Desktop logs and observe repeated workspace routing discovery failures, timeouts, and HTTP 432 responses.
  7. Switch from TUN mode to the Windows system proxy while keeping global proxy routing enabled, and retry authentication. The login issue persists.

Additional observation: After restarting Windows on two separate occasions, the ChatGPT desktop application also required a fresh login, despite previously retaining authentication across system restarts.

This issue is reproducible in my current environment, but I have not confirmed whether it also occurs without a proxy or on earlier application versions.

What is the expected behavior?

Codex Desktop should successfully exchange the OAuth authorization code for an access token, complete ChatGPT authentication, and initialize account and workspace routing.

Previously authenticated desktop sessions should normally remain available across application and Windows restarts, provided the session is still valid.

Temporary network interruptions should not unnecessarily invalidate locally persisted authentication state.

If workspace routing or token exchange fails because of a transient network condition, the application should provide a recoverable error and allow a retry without requiring repeated full authentication.

Additional information

Update and runtime information

  • Codex Desktop package: OpenAI.Codex 26.1007.2314.0
  • Approximate onset: October 10, 2026, following an apparent application update.
  • Local runtime executable: %LOCALAPPDATA%\OpenAI\Codex\bin\2e5e00daee91c61d\codex.exe
  • Runtime executable last modified: October 10, 2026, at 17:18:52 (local time). This timestamp is consistent with the suspected update period but does not independently establish the package installation time.

Network configuration

  • Local HTTP proxy: 127.0.0.1:X
  • Previously working configuration: TUN mode + global proxy routing.
  • Also tested: Windows system proxy + global routing.
  • Proxy nodes have shown intermittent connectivity problems and elevated latency.

OAuth endpoint connectivity test

A request containing deliberately invalid OAuth parameters was sent directly to the relevant endpoint through the local HTTP proxy:

curl.exe -sS -D - -o NUL `
  --max-time 60 `
  --proxy "http://127.0.0.1:X" `
  -H "Content-Type: application/x-www-form-urlencoded" `
  --data "grant_type=test" `
  -w "HTTP=%{http_code} TLS-ready=%{time_appconnect}s Total=%{time_total}s Exit=%{exitcode}`n" `
  "https://auth.openai.com/oauth/token"

The test completed successfully at the HTTP transport level:

HTTP/1.1 200 Connection established
HTTP/1.1 400 Bad Request
HTTP=400
TLS-ready=14.356540s
Total=15.949031s
Exit=0
openai-processing-ms: 10

The HTTP 400 response is expected because the OAuth parameters were deliberately invalid.

This confirms that the endpoint is reachable through the proxy and can process requests, although TLS establishment is unusually slow.

Earlier diagnostic attempts also produced connection timeouts and intermittent Schannel TLS errors, indicating potentially unstable network conditions.

Additional diagnostic finding:

I executed login status using the exact codex.exe bundled with my Codex Desktop installation (26.1007.2314.0).

The result was:

Logged in using ChatGPT

However, the Desktop application still fails after browser authorization with:

Sign-in failed: workspace routing discovery timed out

My logs also contain repeated account/read failures, workspace routing discovery timeouts, and HTTP 432 (Workspace routing is unavailable).

This indicates that local ChatGPT authentication state is present and recognized by the bundled CLI, while the Desktop application is unable to complete account/workspace initialization.

My explicit-proxy test of the OAuth token endpoint returned HTTP 400 as expected, with a TLS establishment time of 14.36 seconds. The possibility of a workspace-routing timeout interacting with high network latency may be worth investigating.

Related issues

The application update may have changed authentication or networking behavior in a way that makes previously tolerated network instability more disruptive. However, causality has not been established.

I would appreciate guidance on whether this is a known regression in 26.1007.2314.0, and whether a fix or supported workaround is available that does not require deleting local authentication data or changing a previously working system-wide proxy configuration.

Activity

  1. added
    app
    on Oct 12, 2026
  2. added
    bug
    windows-os
    auth
    connectivity
    on Oct 12, 2026
  3. HTTNH commented on Oct 12, 2026

    @HTTNH
    Author

    Additional diagnostic finding:

    I executed login status using the exact codex.exe bundled with my Codex Desktop installation (26.1007.2314.0).

    The result was:

    Logged in using ChatGPT
    

    However, the Desktop application still fails after browser authorization with:

    Sign-in failed: workspace routing discovery timed out
    

    My logs also contain repeated account/read failures, workspace routing discovery timeouts, and HTTP 432 (Workspace routing is unavailable).

    This indicates that local ChatGPT authentication state is present and recognized by the bundled CLI, while the Desktop application is unable to complete account/workspace initialization.

    My explicit-proxy test of the OAuth token endpoint returned HTTP 400 as expected, with a TLS establishment time of 14.36 seconds. The possibility of a workspace-routing timeout interacting with high network latency may be worth investigating.

  4. BXNS-X commented on Oct 12, 2026

    @BXNS-X

    I'm using the free version and yesterday I was logged in and used it, but today I can't sign in

  5. ranjanilobo commented on Oct 12, 2026

    @ranjanilobo

    Additional reproduction details from a separate Windows 11 user (Codex desktop OpenAI.Codex 26.1007.2314.0):

    • Desktop ChatGPT login consistently fails with token_exchange_failed / error sending request for url (https://auth.openai.com/oauth/token).
    • The Codex CLI on the same PC successfully completes browser OAuth (oauth token exchange succeeded; codex login status reports logged in using ChatGPT). Browser access to the user's ChatGPT Enterprise workspace also works normally.
    • A coworker on the same office network, with the exact same desktop version and package status Ok, can log in successfully. Both PCs show Norton Web/Mail Shield Root as the issuer for auth.openai.com; therefore Norton TLS interception alone does not distinguish the failing machine.
    • curl.exe -4 reaches https://auth.openai.com/oauth/token over TLS; GET returns HTTP 405 and invalid-grant POST returns HTTP 400, suggesting the endpoint is reachable from this machine via curl (not proof the desktop network stack works).
    • Desktop logs show repeated account/login/start followed by account_login_completed ... success=false; other log lines show sa_server_request_failed ... errorMessage="Workspace routing is unavailable" ... status=432 on /settings/user and /wham/usage, plus workspace routing discovery failed.
    • Windows AppModel-State logged a SettingsInitialize failure, followed by Repair of state locations ... returned Error Code: 0; no newer related event found. Reinstall, reboot, Windows sign-out, and Windows app Repair did not resolve it.
    • The user also had Anaconda SSL_CERT_FILE set in an auto-activated PowerShell environment; disabling auto-activation did not fix desktop login.

    This is a separate Enterprise-workspace user, not the original issue reporter (who listed Plus). These observations do not establish whether workspace routing errors are causal or a downstream symptom. No tokens, authorization codes, or private log files are included.

  6. Lamonin commented on Oct 13, 2026

    @Lamonin

    Yeah, same problem, started from yesterday

  7. x-xyu commented on Oct 14, 2026

    @x-xyu

    7. 是的,同样的问题,从昨天开始就出现了。

    did u solve this problem yet?

  8. x-xyu commented on Oct 14, 2026

    @x-xyu

    Confirmed workaround: set proxy variables at the Windows user level

    I encountered the same symptoms with Codex Desktop for Windows OpenAI.Codex 26.1007.2314.0, using Clash / Clash Verge with a local HTTP proxy:

    • Desktop sign-in failed with token_exchange_failed and/or workspace routing discovery timed out.
    • The bundled Codex CLI already reported Logged in using ChatGPT from login status.
    • A test POST to https://auth.openai.com/oauth/token through the proxy returned the expected HTTP 400 for intentionally invalid parameters, so the OAuth endpoint was reachable through the proxy.
    • Adding HTTP_PROXY, HTTPS_PROXY, etc. to %USERPROFILE%\.codex\.env and restarting Codex did not fix the desktop error.
    • At that point, Get-ChildItem Env: | Where-Object Name -Match 'PROXY' in PowerShell returned nothing.

    What worked: I set the proxy environment variables in the Windows user environment (not just the .codex\.env file or current PowerShell session):

    $proxy = "http://127.0.0.1:7890"  # Replace 7890 with your actual Clash HTTP/Mixed port
    [Environment]::SetEnvironmentVariable("HTTP_PROXY",  $proxy, "User")
    [Environment]::SetEnvironmentVariable("HTTPS_PROXY", $proxy, "User")
    [Environment]::SetEnvironmentVariable("ALL_PROXY",   $proxy, "User")
    [Environment]::SetEnvironmentVariable("NO_PROXY", "localhost,127.0.0.1,::1", "User")

    After applying this user-level configuration and restarting the Codex desktop sign-in flow, the desktop login succeeded. I then opened a project and confirmed that Codex was usable, not merely signed in.

    For anyone trying this, fully exit Codex and sign out/in to Windows or reboot before retrying, so the desktop process starts with the updated user environment. Keep Clash running on the configured port. Note that user-level proxy variables can also affect other applications, so back up any existing values before changing them.

    This is a workaround confirmed on one machine, not proof of the underlying cause or a universal fix. It suggests that the desktop app's inheritance/use of proxy settings is worth investigating.

  9. bugrabastaban commented on Oct 14, 2026

    @bugrabastaban

    I have the same problem and I haven't been able to solve it yet.

  10. melroe commented on Oct 14, 2026

    @melroe

    [Windows Codex 26.1007.9446.0] Intermittent token_exchange_failed — Login succeeds after signing out of ChatGPT Web without clearing cookies

    Date: October 14, 2026
    Platform: Windows x64, native Windows execution
    Codex Desktop: OpenAI.Codex 26.1007.9446.0 (Microsoft Store)
    Subscription: Two ChatGPT Plus accounts
    Related issue: #53261

    Problem

    Codex Desktop intermittently fails to authenticate ChatGPT accounts, even though browser authentication works and the OAuth token endpoint is reachable.

    The displayed error is:

    Sign-in could not be completed
    
    Token exchange failed: error sending request for url
    (https://auth.openai.com/oauth/token)
    
    Error code: token_exchange_failed
    

    Observed behavior

    1. Account A initially worked in Codex Desktop, but Account B repeatedly failed to authenticate.
    2. The problem occurred both with and without the third-party account switcher CCSwitch.
    3. After signing out of Account A directly inside Codex Desktop, Account B successfully authenticated once.
    4. After signing out again, authentication failed repeatedly. Both accounts subsequently became difficult to log into.
    5. Removing ~/.codex/auth.json after backing it up did not resolve the failure.
    6. Changing browsers, proxy settings, and enabling Clash TUN mode did not consistently resolve it.

    Important discovery: Successful recovery

    I eventually recovered the Codex Desktop login using the following procedure:

    1. Signed out of my existing ChatGPT account on the ChatGPT website.
    2. Did NOT clear browser cookies, browsing history, or browser cache.
    3. Returned to Codex Desktop.
    4. Initiated a new ChatGPT sign-in.
    5. Completed OAuth authorization successfully.

    Result: Codex Desktop login succeeded.

    The recovery required no reinstall, system network changes, or manual clearing of authentication files during this final attempt.

    Network diagnostics

    • Local HTTP proxy: 127.0.0.1:7890
    • Windows proxy environment variables were correctly configured.
    • A test POST to auth.openai.com/oauth/token returned the expected HTTP 400 for an intentionally invalid grant type, confirming basic connectivity.
    • Codex established connections through both the local proxy and remote port 443.

    Additional logs showed repeated App Server WebSocket failures:

    hostId=durable
    transport=websocket
    connection_failed_before_ready
    WebSocket was closed before the connection was established
    reconnectAttempt=47
    

    The WebSocket failures have not been established as the cause of OAuth failure.

    Possible area to investigate

    The recovery suggests that the interaction between browser authentication sessions and Codex Desktop's OAuth state may be relevant.

    Possible areas include:

    • Account selection during browser-to-desktop OAuth authorization.
    • Handling of existing browser sessions when switching ChatGPT accounts.
    • Stale or inconsistent client-side OAuth state.
    • Error recovery after an unsuccessful token exchange.

    This is a hypothesis, not a confirmed root cause. A single successful recovery does not establish that the workaround is reliable.

    Expected behavior

    Codex Desktop should authenticate reliably after account sign-out and sign-in, regardless of whether another ChatGPT account was previously authenticated in the browser.

    When token exchange fails, the client should expose a more precise diagnostic error and recover cleanly on the next attempt.

    Request

    Could the Codex team investigate intermittent OAuth token exchange failures involving browser login state and multi-account transitions on Windows Desktop?

    In particular, why does signing out of ChatGPT Web — without clearing cookies — allow a previously failing Codex Desktop authorization to complete?

  11. SAR-December5 commented on Oct 21, 2026

    @SAR-December5

    Additional reproduction details: Clash Party / Windows Desktop 26.1013.4894.0

    I am experiencing the same intermittent login failure on Windows 11 x64 (OS build 10.0.26200.0) with Codex Desktop package OpenAI.Codex 26.1013.4894.0.

    Observed errors

    • token_exchange_failed: error sending request for url (https://auth.openai.com/oauth/token)
    • workspace routing discovery failed / workspace routing discovery timed out

    The UI alternates between these errors across retry attempts. ChatGPT login in the browser works, but Codex Desktop does not complete login reliably.

    Proxy and connectivity checks

    • I switched to Clash Party. Its configured ports are Mixed 7890, SOCKS 7891, and HTTP 7892; the Windows system proxy is enabled at 127.0.0.1:7890.
    • Clash Party's connection details show auth.openai.com:443 matching DomainKeyword(openai) and routing through a proxy group to a Japan node (not DIRECT).
    • Test-NetConnection 127.0.0.1 -Port 7892 succeeds.
    • A POST with deliberately invalid parameters through the HTTP proxy at 127.0.0.1:7892 to https://auth.openai.com/oauth/token returns HTTP 400 with a JSON invalid_value error for grant_type=test. This confirms that this test request reaches the OAuth endpoint through that proxy; it does not prove that Codex's own token exchange succeeds.
    • The same endpoint's root URL returned a Cloudflare 403 challenge, but the OAuth POST above returned the expected API JSON error.
    • I updated Windows user-level HTTP_PROXY and HTTPS_PROXY to http://127.0.0.1:7890, added ALL_PROXY and NO_PROXY, restarted Windows, and also tried Clash Party's Global mode. The issue persists.
    • Earlier diagnostics with the previous proxy configuration showed direct OAuth probes timing out and IPv4 TLS ending unexpectedly. DevNet Doctor later detected the Windows system proxy at 127.0.0.1:7890, but its .NET OAuth probes still timed out. These probes are not the Codex application's own requests.

    I have not confirmed a root cause. The results suggest that basic OAuth endpoint connectivity through the local proxy works for a simple test request, while the desktop application's actual token exchange and/or subsequent workspace routing initialization still fails.

    Could the team advise what additional sanitized logs or diagnostics would help determine whether this is a Windows desktop regression, proxy/environment inheritance issue, or workspace-routing service problem?

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