Repository navigation
Open
Labels
appIssues related to the Codex desktop appauthIssues related to authentication and accountsbugSomething isn't workingconnectivityIssues involving networking or endpoint connectivity problems (disconnections)windows-osIssues related to Codex on Windows systems
Description
좋습니다. 아래 내용을 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
Metadata
Metadata
Assignees
Labels
appIssues related to the Codex desktop appauthIssues related to authentication and accountsbugSomething isn't workingconnectivityIssues involving networking or endpoint connectivity problems (disconnections)windows-osIssues related to Codex on Windows systems
Activity
github-actions commentedon Oct 1, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
luke-fawcett commentedon Oct 1, 2026
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
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:
It also confirms healthy ChatGPT connectivity:
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:
Windows-native HTTPS/TLS connectivity succeeds:
No relevant proxy variables are configured.
Windows DisableRootAutoUpdate policy is not present.
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:
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:
kang888888 commentedon Oct 1, 2026
Same issue here on Windows desktop.
kang888888 commentedon Oct 1, 2026
Adding the build details I mentioned in my comment above.
So my install is on 26.928.3736.0 (x64) — the same build as in this issue title.
potato2lemon commentedon Oct 3, 2026
I can confirm this issue is still reproducible on a newer Stable build.
Environment
Stable app
What works on the exact same PC / account / network
I also tested:
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.