Skip to content

Windows desktop OAuth regression: 26.928.3736.0 fails with token_exchange_failed / “Unable to load organization settings”, Beta works #49845

Open

Description

@chindi1130-star

좋습니다. 아래 내용을 GitHub 버그 신고 본문 최종본으로 그대로 붙여넣으시면 됩니다.
Title
Windows desktop OAuth regression: 26.928.3736.0 fails with token_exchange_failed / “Unable to load organization settings”, Beta works

Body
Summary
The regular Windows ChatGPT/Codex desktop app fails to start correctly after updating to 26.928.3736.0.
The app first showed:
Unable to load organization settings
More recently, the login flow reached the browser authorization step but failed during OAuth token exchange with:
token_exchange_failed
error sending request for url (https://auth.openai.com/oauth/token)
What works

  • ChatGPT/Codex Beta 26.727.4816.0 works
  • Codex CLI 0.159.3 works
  • Codex CLI login succeeds
  • Codex CLI can actually send prompts and receive responses
  • Browser authentication opens normally
    What fails
  • Regular Windows app OpenAI.Codex 26.928.3736.0
  • Regular app shows Unable to load organization settings
  • On another attempt, desktop login fails with:
    token_exchange_failed
    error sending request for url (https://auth.openai.com/oauth/token)
    Troubleshooting already tried
  • Tested on normal corporate/school network
  • Tested on mobile hotspot
  • App Repair
  • App Reset
  • Re-login
  • Renamed old .codex-global-state.json files
  • Set CODEX_HOME=C:\CodexHome
  • Set CODEX_HOME=%LOCALAPPDATA%\OpenAI\CodexHome
  • Confirmed CODEX_HOME is persisted as a User environment variable
  • Restarted Windows after changing CODEX_HOME
    Endpoint protection
    Endpoint protection is:
    AhnLab V3 Endpoint Security 9.0
    I attempted to add the Codex state folder to scan exclusions, but this is blocked by administrator policy, so I cannot modify the allowlist.
    Additional observations
    ChatGPT Beta previously failed with:
    EPERM: operation not permitted, rename ....codex-global-state.json.tmp-* -> ....codex-global-state.json
    Moving CODEX_HOME allowed Beta to work normally.
    The regular app then worked briefly, but after updating to 26.928.3736.0, it failed again.
    With CODEX_HOME set to:
    C:\Users\user\AppData\Local\OpenAI\CodexHome
    the regular app still fails, and the new CODEX_HOME remains empty after the failed launch:
  • no .sandbox
  • no sessions
  • no other state files
    This suggests the regular app may be failing before normal Codex state/session initialization.
    Direct OAuth endpoint test
    I also tested the OAuth token endpoint directly with:
    curl.exe -v -d "grant_type=test" https://auth.openai.com/oauth/token
    The result shows:
  • DNS resolution works
  • TCP 443 connection succeeds
  • TLS negotiation succeeds
  • HTTP POST reaches auth.openai.com
  • OpenAI returns a valid HTTP/1.1 400 Bad Request JSON response
    The 400 is expected because grant_type=test is intentionally invalid.
    This suggests the OAuth endpoint itself is reachable and TLS is functioning, while the failure appears specific to the desktop app's token exchange flow.
    Environment
  • Windows 11 64-bit
  • OpenAI.CodexBeta 26.727.4816.0
  • OpenAI.Codex 26.928.3736.0
  • Codex CLI 0.159.3
  • Endpoint protection: AhnLab V3 Endpoint Security 9.0
    Expected behavior
    The regular desktop app should complete OAuth token exchange and start normally, as the Beta app and Codex CLI do.
    Actual behavior
    The regular app fails during startup/login with either:
  • Unable to load organization settings
  • or token_exchange_failed during https://auth.openai.com/oauth/token
    while Beta and CLI continue to work.

가능하면 여기에 오류 화면 스크린샷 2장도 첨부하세요.

  • Unable to load organization settings
  • token_exchange_failed

Activity

  1. added
    bug
    app
    windows-os
    auth
    connectivity
    on Oct 1, 2026
  2. luke-fawcett commented on Oct 1, 2026

    @luke-fawcett

    Same issue:

    Title: Windows ChatGPT/Codex desktop OAuth fails with token_exchange_failed despite successful VS Code Codex OAuth and healthy shared Codex auth/network state

    Environment

    • Windows 10 Home 64-bit, build 19045
    • Desktop package: OpenAI.Codex
    • Installed desktop build: 26.928.2636.0
    • Bundled Codex runtime: 0.159.2
    • ChatGPT works normally in browser
    • Official Codex extension in VS Code works and authenticates successfully

    Summary
    The Windows desktop Codex experience cannot complete ChatGPT OAuth.
    Browser approval succeeds, but the desktop application's token exchange fails with:
    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
    The desktop UI subsequently shows:
    Reconnecting … waiting for network

    Important isolation result
    The official Codex VS Code extension on the same PC, same account, and same network successfully completes Sign in with ChatGPT.
    After authenticating through VS Code, codex doctor confirms the shared Codex auth state is valid:

    • stored auth mode: chatgpt
    • stored API key: false
    • stored ChatGPT tokens: true
      It also confirms healthy ChatGPT connectivity:
    • Responses WebSocket: HTTP 101 Switching Protocols
    • ChatGPT inference endpoint reachable
    • desktop assets CDN reachable: HTTP 200
    • 0 doctor failures
      Despite this known-good shared Codex state, fully exiting all ChatGPT/Codex processes and launching the Windows desktop app causes the desktop app to initiate its own OAuth flow. Browser approval succeeds, but the desktop token exchange again fails with token_exchange_failed.

    Desktop log evidence
    Prior to repairing authentication through VS Code, the desktop logs repeatedly reported:
    app_server_connection.transport_connect_failed errorMessage="Sign in to ChatGPT to start a durable thread."
    followed by repeated WebSocket reconnection attempts approximately every 20 seconds.
    This matched the visible Reconnecting … waiting for network state.
    Network / TLS troubleshooting completed
    The issue reproduces on:

    Separate certificate issue identified and isolated
    Miniconda activation sets:
    SSL_CERT_FILE=C:\Users<user>\AppData\Local\Programs\Miniconda3\Library\ssl\cacert.pem
    When present, codex doctor reports:
    invalid peer certificate: UnknownIssuer
    Deactivating Conda removes SSL_CERT_FILE.
    With Conda deactivated, codex doctor reports:

    • ChatGPT OAuth credentials present
    • WebSocket connected (HTTP 101)
    • ChatGPT inference reachable
    • CDN reachable (HTTP 200)
    • zero failures
      The desktop OAuth failure still occurs from this clean state.
      Therefore the Miniconda certificate override is a separate local issue and does not account for the remaining desktop OAuth failure.

    API-key workaround
    API-key authentication was temporarily used.
    In that state the shared Codex runtime could reach OpenAI, but desktop durable threads failed because the application required ChatGPT authentication:
    Sign in to ChatGPT to start a durable thread.
    The API-key workaround was removed and successful ChatGPT auth was subsequently established through VS Code.

    Expected behavior
    After successful browser approval, the Windows desktop app should complete the OAuth token exchange and use the valid ChatGPT-authenticated Codex session.

    Actual behavior
    The desktop application fails its OAuth token exchange with:
    token_exchange_failed
    even though the same account successfully authenticates through the VS Code Codex extension and the shared Codex runtime passes WebSocket and HTTP connectivity tests.

    Additional update discrepancy
    The desktop application's Check for updates reports that it is up to date.
    codex doctor, however, reports:

    • installed desktop build: 26.928.2636.0
    • available desktop build: 26.928.3736.0
  3. kang888888 commented on Oct 1, 2026

    @kang888888

    Same issue here on Windows desktop.

    • Signed in with a ChatGPT account (no API key configured)
    • Exact dialog: "Unable to load organization settings. The application has been paused until organization settings can be loaded safely."
    • Retry does not help. Sign out and sign back in does not help.
    • Codex CLI on the same machine works normally. ChatGPT in the browser also works.
    • The problem is reproducible on every launch after the first failure.
    • This is the same pattern as the original report: web and CLI are fine, only the Windows desktop app fails to initialize organization settings.
    • I can provide my exact app build number if that helps.
  4. kang888888 commented on Oct 1, 2026

    @kang888888

    Adding the build details I mentioned in my comment above.

    PS> Get-AppxPackage OpenAI.Codex | Select Name, Version, PackageFullName
    
    Name         Version       PackageFullName
    ----         -------       ---------------
    OpenAI.Codex 26.928.3736.0 OpenAI.Codex_26.928.3736.0_x64__2p2nqsd0c76g0
    

    So my install is on 26.928.3736.0 (x64) — the same build as in this issue title.

  5. potato2lemon commented on Oct 3, 2026

    @potato2lemon

    I can confirm this issue is still reproducible on a newer Stable build.
    Environment

    • Windows 10 Enterprise 22H2, build 10.0.19045.6456, x64
    • Stable Windows app: OpenAI.Codex 26.930.3930.0
    • ChatGPT Plus
    • CODEX_HOME=D:\CodexData\home
      Stable app
    • Immediately shows “Unable to load organization settings”
    • Retry does not help
    • Repair / Reset / uninstall + reinstall do not help
    • The issue first appeared after a Stable app update
    • Updating again from 26.928.2636.0 to 26.930.3930.0 did not resolve it
      What works on the exact same PC / account / network
    • ChatGPT Web works normally
    • Codex CLI works normally
    • codex doctor reports healthy databases, valid ChatGPT auth, successful HTTP/WebSocket connectivity (HTTP 101 Switching Protocols)
    • ChatGPT Beta works normally
    • Beta can see the same Codex projects and conversation history as Stable
      I also tested:
    • removing/recreating authentication state
    • clean app reinstall
    • resetting app data
    • checking proxy / WinHTTP / environment variables
    • regenerating Codex local configuration
    • temporarily downgrading Codex CLI to 0.153.0
      None of these changed the Stable app behavior.
      Since Beta works with the same account, network, and CODEX_HOME while Stable 26.930.3930.0 fails, this appears to be specific to the Stable Windows desktop app’s organization/workspace initialization path.
      Please let me know if logs from Stable 26.930.3930.0 would be useful.
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