Skip to content

[Windows Desktop] App WebSocket Connection Timeout After Upgrade to 26.924.2738.0 #48627

Open

Description

@dingxin150015-commits

Desktop App WebSocket Connection Timeout After Upgrade to 26.924.2738.0

Summary

After upgrading from version 26.923.x to 26.924.2738.0, the Codex desktop application fails to load with the error message "Unable to load organization settings." The root cause is a WebSocket handshake timeout when connecting through a proxy server.

Environment

  • OS: Windows 11 Home (Build 10.0.26200)
  • Codex Desktop Version: 26.924.2738.0
  • Previous Working Version: 26.923.x (exact version unknown, backup dated 2026-09-26)
  • Network Setup: Behind proxy (Clash, 127.0.0.1:7890)
  • System Proxy: Configured and enabled (127.0.0.1:7890)

Steps to Reproduce

  1. Install/upgrade to Codex desktop version 26.924.2738.0
  2. Launch the desktop application in a network environment requiring proxy access
  3. Application displays "Unable to load organization settings" error

Expected Behavior

The desktop application should successfully connect through the configured system proxy, as it did in version 26.923.x.

Actual Behavior

  • Desktop application shows "Unable to load organization settings"
  • codex doctor reports: WebSocket handshake timed out
  • HTTP/HTTPS requests work normally (reachability tests pass)
  • Only WebSocket connections fail

Diagnostic Information

From codex doctor:

⚠ websocket    Responses WebSocket timed out; HTTPS fallback may still work
    model provider           openai
    provider name            OpenAI
    wire API                 responses
    supports websockets      true
    proxy env vars           none
    connect timeout          15000 ms
    auth mode                chatgpt
    endpoint                 wss://chatgpt.com/backend-api/<redacted>
  · handshake timed out

✓ reachability active provider endpoints are reachable over HTTP
    reachability mode        ChatGPT auth
    ChatGPT inference URL    https://chatgpt.com/backend-api/<redacted> reachable (HTTP 405)

Network Observations:

  • Desktop app establishes connections to proxy port (127.0.0.1:7890) - verified via netstat
  • 30+ ESTABLISHED connections to proxy port observed
  • HTTP/HTTPS requests succeed through proxy
  • Only WebSocket upgrade requests fail

Key Finding: CLI Works, Desktop App Doesn't

CLI (✅ WORKS):

export HTTP_PROXY=http://127.0.0.1:7890
export HTTPS_PROXY=http://127.0.0.1:7890
export ALL_PROXY=http://127.0.0.1:7890
codex doctor

Result: WebSocket connected (HTTP 101 Switching Protocols)

Desktop App (❌ FAILS):

Using system proxy configuration (same proxy settings)
Result: WebSocket handshake timed out

Investigation Summary

We conducted extensive troubleshooting to isolate the issue:

✅ Confirmed Working:

  1. Proxy server (Clash): Fully functional, supports WebSocket (CLI test confirms)
  2. Proxy nodes: Tested both Trojan and AnyTLS protocols - both work with CLI
  3. System proxy configuration: Properly set to 127.0.0.1:7890
  4. HTTP/HTTPS connections: Desktop app successfully makes HTTP requests through proxy
  5. Authentication: CLI uses tokens from ~/.codex/auth.json successfully

❌ Ruled Out:

  1. WinHTTP proxy settings: Tested setting netsh winhttp set proxy - no effect
  2. Proxy protocol compatibility: Switched between different node types - same failure
  3. Cloudflare blocking: CLI succeeds, indicating server-side is not the issue
  4. config.toml proxy configuration: Desktop app doesn't read this file
  5. Network connectivity: General connectivity works, only WebSocket fails

🎯 Root Cause Analysis:

The desktop application and CLI handle proxy connections differently:

Aspect CLI (Works) Desktop App (Fails)
Proxy detection Environment variables → System proxy System proxy only
Authentication Reads ~/.codex/auth.json Uses encrypted local storage
WebSocket result HTTP 101 Success Timeout

Evidence suggests: When the desktop app sends WebSocket upgrade requests through the proxy, the request either:

  1. Lacks necessary authentication headers/cookies, causing Cloudflare to return 403
  2. Uses a different network stack that doesn't properly handle proxy WebSocket connections
  3. Has a timeout value too short for the proxy round-trip time

Manual testing with curl through the same proxy shows WebSocket upgrade requests receive HTTP/1.1 403 Forbidden (Cloudflare challenge page), while CLI succeeds - suggesting the desktop app's requests are missing proper authentication context.

Temporary Workaround

Using the CLI with environment variables works:

export HTTP_PROXY=http://127.0.0.1:7890
export HTTPS_PROXY=http://127.0.0.1:7890
codex.exe

Previous Version Behavior

Version 26.923.x (pre-upgrade):

  • ✅ Desktop app worked normally with same proxy configuration
  • ✅ No proxy configuration in config.toml needed
  • ✅ Automatically used Windows system proxy settings

This suggests a regression in proxy/WebSocket handling in the new version.

Additional Context

  1. Backup verification: We have a complete backup from 2026-09-26 16:02 (pre-upgrade) with no proxy-related configuration, confirming the old version worked automatically
  2. Multiple proxy configurations tested: Both local subscription and remote subscription nodes tested
  3. Geographic considerations: Proxy necessary for accessing ChatGPT services from current location
  4. UWP app characteristics: Desktop app runs as UWP (package: OpenAI.Codex_2p2nqsd0c76g0), which may have different network isolation from CLI

Request

Could you please investigate why the desktop application no longer properly handles WebSocket connections through system proxies after the upgrade? This appears to be a regression from the previous version.

If additional diagnostic information is needed, please let me know what commands or logs would be helpful.

System Information

Version: 26.924.2738.0
OS: Windows 10.0.26200 (Windows 11 Core) [64-bit]
OS Language: zh-CN
CLI Version: 0.158.0-alpha.2.1
Auth Mode: chatgpt
Stored ChatGPT tokens: true

Activity

  1. added
    bug
    app
    windows-os
    connectivity
    on Sep 27, 2026
  2. changed the title [-]Desktop App WebSocket Connection Timeout After Upgrade to 26.924.2738.0[/-] [+][Windows Desktop] App WebSocket Connection Timeout After Upgrade to 26.924.2738.0[/+] on Sep 27, 2026
  3. ATlantisMo-Zhang commented on Sep 28, 2026

    @ATlantisMo-Zhang

    I can reproduce this on the same Windows Desktop build and would like to add another data point.

    Environment

    • Windows 11
    • Codex Desktop: 26.924.2738.0
    • Bundled CLI / doctor: 0.158.0-alpha.2.1
    • Clash Verge Rev v2.5.6
    • Clash mode: Global
    • TUN: off
    • Windows system proxy: 127.0.0.1:7897

    Impact

    • Desktop app has been unusable for about a day with "Unable to load organization settings".
    • Before a Windows update/reboot, the same dialog had already appeared once but clicking Retry recovered. After the reboot, it became consistently reproducible.

    codex doctor --summary

    ✓ config       loaded
    ✓ auth         auth is configured
    ✓ reachability active provider endpoints are reachable over HTTP
    ⚠ websocket    Responses WebSocket timed out; HTTPS fallback may still work
    

    Additional checks

    • Local proxy port 7897 is listening and reachable.
    • HTTPS through the proxy works for https://chatgpt.com and https://auth.openai.com (TLS completes; curl reaches Cloudflare and receives 403 challenge as expected for curl).
    • I tested a temporary 127.0.0.1:1080 -> 127.0.0.1:7897 portproxy workaround; it did not help.
    • I also explicitly set HTTP_PROXY, HTTPS_PROXY, and ALL_PROXY to http://127.0.0.1:7897 and launched ChatGPT.exe from that same shell; the desktop app still showed the same organization-settings error.
    • Config and auth therefore appear healthy; the consistent failure is the Responses WebSocket path.

    This strongly looks like the same 26.924.2738.0 Windows desktop proxy/WebSocket regression described here. A rollback build, hotfix, or guidance on any additional logs that would help would be appreciated.

  4. lo12580 commented on Sep 29, 2026

    @lo12580

    I can reproduce the same "Unable to load organization settings" failure on Windows Desktop 26.924.2738.0, but with one important difference from the original report: in my case, codex doctor shows the Responses WebSocket connection succeeding with HTTP 101 Switching Protocols.
    Environment

    • Windows 10 Pro 10.0.19045 (64-bit)
    • Codex / ChatGPT Desktop: 26.924.2738.0
    • Codex CLI / doctor: 0.155.1
    • Clash Verge / Mihomo
    • Clash mode during testing: Global
    • Windows system proxy: 127.0.0.1:7897
      Impact
    • Desktop consistently fails at startup with "Unable to load organization settings".
    • Codex CLI continues to work normally.
      codex doctor
      Relevant results:
      ✓ config loaded
      ✓ auth auth is configured
      ✓ websocket connected (HTTP 101 Switching Protocols)
      ✓ reachability active provider endpoints are reachable over HTTP
      Additional doctor checks also showed:
      ChatGPT inference URL reachable (HTTP 405)
      desktop assets CDN reachable (HTTP 200)
      A real CLI request also succeeds:
      codex exec --skip-git-repo-check "Reply only: OK"
      ...
      OK
      Additional checks
    • Clash local proxy port 127.0.0.1:7897 is listening and reachable.
    • HTTPS through that proxy works for https://chatgpt.com and returns HTTP 200 OK.
    • desktop.chat.openai.com was checked through Google DNS-over-HTTPS via the proxy and returned Status: 3 (NXDOMAIN), with authority for openai.com.
    • I temporarily removed ~/.codex/config.toml and launched the Desktop app with no config file present; the same organization-settings error remained.
    • Windows Repair for the app did not resolve the issue.
    • Get-AppxPackage OpenAI.Codex reports Status: Ok.
    • Windows AppModel/TWinUI logs show the app process and AppX container being created successfully and app activation completing successfully.
    • An AppX registration attempt produced 0x80073D02 only because the app was still running; a registration operation immediately before that completed successfully.
      Why this may be useful
      This looks related to the same 26.924.2738.0 Windows Desktop startup regression, but it does not reproduce the exact WebSocket-timeout signature from the original report.
      In this case:
    • authentication works;
    • CLI works;
    • Responses WebSocket works;
    • normal HTTP reachability works;
    • the MSIX package/activation path appears healthy;
    • removing config.toml does not change the result;
    • yet Desktop still fails while loading organization settings.
      That suggests the user-visible error may also be triggered by a Desktop-specific organization-settings/bootstrap path after the WebSocket connection itself has already succeeded.
      If useful, I can provide the full codex doctor output and relevant AppModel / AppX event logs.
  5. lo12580 commented on Sep 29, 2026

    @lo12580

    我可以在 Windows 桌面系统 26.924.2738.0 上重现同样的“无法加载组织设置”错误,但与原始报告有一个重要的区别:在我的例子中,Codex Doctor 显示 WebSocket 连接成功,并返回了 HTTP 101 协议切换状态码。 环境

    • Windows 10 专业版 10.0.19045 (64 位)
    • Codex / ChatGPT 桌面版:26.924.2738.0
    • Codex CLI / doctor:0.155.1
    • Clash Verge / Mihomo
    • 测试期间的冲突模式:全球
    • Windows 系统代理:127.0.0.1:
      7897 影响
    • 桌面系统在启动时始终失败,并显示“无法加载组织设置”。
    • Codex CLI 继续正常工作。codex
      doctor
      相关结果:
      ✓ 配置已加载
      ✓ 身份验证已配置
      ✓ WebSocket 已连接(HTTP 101 切换协议)
      ✓ 可达性 活动提供商端点可通过 HTTP 访问
      其他 doctor 检查还显示:
      ChatGPT 推断 URL 可访问(HTTP 405)
      桌面资源 CDN 可访问(HTTP 200)
      实际 CLI 请求也成功:
      codex exec --skip-git-repo-check "仅回复:OK"
      ...
      OK
      其他检查
    • Clash 本地代理端口 127.0.0.1:7897 正在监听且可访问。
    • 通过该代理的 HTTPS 可以访问https://chatgpt.com并返回 HTTP 200 OK。
    • 通过代理使用 Google DNS-over-HTTPS 检查 desktop.chat.openai.com,返回状态:3 (NXDOMAIN),授权对象为 openai.com。
    • 我暂时删除了 ~/.codex/config.toml 文件,并在没有配置文件的情况下启动了桌面应用程序;但仍然出现同样的组织设置错误。
    • Windows 修复程序无法解决该应用程序的问题。
    • Get-AppxPackage OpenAI.Codex 报告状态:正常。
    • Windows AppModel/TWinUI 日志显示应用程序进程和 AppX 容器已成功创建,应用程序激活也已成功完成。
    • AppX 注册尝试仅因应用程序仍在运行而产生 0x80073D02 错误;在此之前立即进行的注册操作已成功完成。
      此信息可能有用:
      这似乎与 26.924.2738.0 Windows 桌面启动回归问题相关,但并未重现原始报告中的 WebSocket 超时签名。
      在这种情况下:
    • 身份验证有效;
    • CLI 功能正常;
    • WebSocket响应正常;
    • HTTP 连接正常;
    • MSIX 包/激活路径看起来正常;
    • 删除 config.toml 文件并不会改变结果;
    • 然而,桌面版在加载组织设置时仍然失败。
      这表明,用户可见的错误也可能是由 WebSocket 连接成功后,桌面版特有的组织设置/引导程序路径触发的。
      如有需要,我可以提供完整的 Codex Doctor 输出以及相关的 AppModel/AppX 事件日志。

    Update: logs_2.sqlite rebuild did not resolve it

    I tested the local diagnostic-log database rebuild workaround as well.

    Before the test:

    • logs_2.sqlite: ~96.36 MB
    • logs_2.sqlite-wal: ~0.31 MB
    • logs_2.sqlite-shm: ~0.03 MB

    After fully closing Codex and moving those files aside, the Desktop app temporarily changed behavior: instead of showing the organization-settings dialog, it launched without a usable UI / appeared unresponsive.

    The workaround did not restore Desktop functionality.

    Without rebooting Windows, a subsequent Desktop launch returned to the original:

    Unable to load organization settings

    So this does not appear to be the large/corrupted logs_2.sqlite case reported by another user. Rebuilding the diagnostic log DB only changed the transient startup behavior and did not resolve the underlying issue.

    CLI, authentication, HTTP reachability, and the Responses WebSocket (HTTP 101) remain healthy.

  6. Thymos2027 commented on Oct 18, 2026

    @Thymos2027

    Related Windows Desktop result, with a narrower symptom than the OP's organization-settings failure:

    On MSIX app 26.1007.2314.0 / app-server 0.162.0-alpha.17.2, using a live FlClash HTTP proxy at 127.0.0.1:7890, new Work/Codex turns repeatedly timed out on Responses WebSocket (1/5 through 5/5) before the HTTPS /responses fallback returned 200. Launching the app from PowerShell with HTTP_PROXY/HTTPS_PROXY/ALL_PROXY already set did not resolve it. The app-server had connections to the local proxy, but that did not establish the routing of its WebSocket attempts.

    %USERPROFILE%\.codex\.env was absent. After adding those three proxy variables and loopback NO_PROXY there, then fully restarting the app, a new Work chat had no reconnect loop. Two WebSocket connections succeeded in the post-restart log window, with zero retry or HTTP-fallback entries. The built-in openai provider was unchanged. The full before/after evidence and caveats are in #29958 (comment) .

    This confirms an effective Codex-scoped workaround on this machine, not the exact cause of the OP's separate organization-settings failure or a universal fix.

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

    appbugconnectivitywindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions