Windows: WebSocket transport times out with respect_system_proxy, works with HTTP_PROXY/HTTPS_PROXY
Open 💬 5 comments Opened Jun 25, 2026 by fei1025
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
What version of the Codex App are you using (From “About Codex” dialog)?
0.142.1
What subscription do you have?
plus
What platform is your computer?
Windows 10
What issue are you seeing?
With network_proxy and respect_system_proxy enabled on Windows, Codex can use the system proxy for HTTPS requests, but WebSocket transport times out and falls back to HTTPS:
Falling back from WebSockets to HTTPS transport. request timed out
If I set HTTP_PROXY and HTTPS_PROXY to the same proxy, WebSocket transport works correctly. It seems WebSocket transport does not fully respect the Windows system proxy configuration.
What steps can reproduce the bug?
Behavior:
- HTTPS requests work through Windows system proxy.
- WebSocket transport times out and falls back to HTTPS.
When HTTP_PROXY/HTTPS_PROXY are set to the same proxy:
- WebSocket transport works correctly.
It appears that WebSocket transport does not fully honor the Windows system proxy resolver.
What is the expected behavior?
_No response_
Additional information
_No response_
5 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
I put together a fork branch for this: https://github.com/openai/codex/compare/main...Nicolas0315:codex:codex/websocket-system-proxy?expand=1
What changed:
ws:///wss://are resolved on the same HTTP/HTTPS system proxy lanes as normal requests.config.respect_system_proxyinto the Responses WebSocket client.ModelClient::newcall sites, including core integration tests and memories startup.Local verification on rtx4090:
just fmtgit diff --checkcargo check --manifest-path codex-rs\Cargo.toml -p codex-client -p codex-api -p codex-corecargo check --manifest-path codex-rs\Cargo.toml -p codex-memories-writecargo test --manifest-path codex-rs\Cargo.toml -p codex-core --test responses_headers --no-runcargo test --manifest-path codex-rs\Cargo.toml -p codex-core --test all --no-runcargo test --manifest-path codex-rs\Cargo.toml -p codex-memories-write --no-runjust test -p codex-client(40 passed)just test -p codex-api(131 passed)SSH verification:
rtx4090:git diff --check, cargo check for affected crates, and the two focused WebSocket/proxy tests passed over SSH.cyberagent-mac-m5max: fresh clone atc38b2e9ba69cb57d197c6e5ba78b5e52ae0870f9, patch apply,git diff --check, cargo check for affected crates, and focused tests passed.rtx5060ti: fresh clone, patch apply, andgit diff --checkpassed; Rust build is blocked by host linker configuration because/usr/bin/link.exefrom GNU coreutils is selected instead of MSVClink.exe.nicolas2025: fresh clone at the same base, patch apply, andgit diff --checkpassed; Rust tests are blocked because that host's cargo/rustc shims under/c/Users/ogosh/work/.cargo/binare zero-byte files.nicolas-macbook-pro: fresh clone at the same base, patch apply, andgit diff --checkpassed; Rust tests are blocked because cargo is not installed on that host.Adjacent CLI data point, not the exact same setup as the Windows app /
respect_system_proxycase.Environment in this case:
HTTP_PROXY/HTTPS_PROXYenv vars in the shell when inspectedObserved:
failed to send websocket request: IO error: Broken pipe (os error 32).Reconnecting... 5/5before the working HTTP/SSE transport was used.So this may be a different root cause than Windows system proxy resolution. But it reinforces the same important split: HTTPS/SSE can be healthy while WebSocket transport is not, and the current retry-before-fallback behavior makes that very painful in real sessions. A first-class HTTP/SSE-only option or faster WebSocket failure fallback would help both cases.
I built a small Windows workaround for this: https://github.com/gaopengbin/chatgpt-proxy-launcher
It launches ChatGPT/Codex with process-scoped
HTTP_PROXY/HTTPS_PROXY, without enabling a global proxy. This fixed the WebSocket proxy path in my test. Unofficial, but may help confirm the same root cause.I can reproduce the same behavior specifically on the Windows Remote Control path.
Environment
Current installation (collected 2026-08-12):
26.803.10989.00.147.0-alpha.6.626.805.11740Failure capture (2026-08-10):
26.803.5235.00.147.0-alpha.6.5has_enrollment=true)With only the native Windows app running, Remote repeatedly timed out while opening its control WebSocket:
As a control, I stopped the competing native Remote host and launched the same bundled app-server with explicit
HTTP_PROXY,HTTPS_PROXY,NO_PROXY, and the required CA certificate. It connected:The explicit helper also reaches
CONNECTEDon the newer0.147.0-alpha.6.6build.This suggests that the native Remote app-server path did not inherit or apply the effective Windows/app proxy configuration. The host logs do not expose the resolved proxy route, so proxy inheritance is the suspected cause rather than a confirmed implementation diagnosis.
The workaround is not practical: it requires a custom PowerShell/app-server launcher to remain open, and the normal desktop app must stay closed to avoid thread-writer contention. Expected behavior is for native Windows Remote to use the same effective proxy configuration as the app/OS, or expose a supported Remote proxy setting and an actionable diagnostic.
The native failure was captured on
26.803.5235.0/0.147.0-alpha.6.5. I have not disrupted the currently active helper to re-run the same controlled native test on26.803.10989.0.Official Remote documentation: https://learn.chatgpt.com/docs/remote-connections
Account, enrollment, server/environment, installation, request, machine, proxy-node, and IP identifiers are intentionally omitted.