[macOS app] Finder-launched Codex may miss shell proxy env and repeatedly reconnect
Codex version
- Codex App:
26.623.70822(build4559) - Bundled CLI:
0.142.4 - Platform: macOS
26.4.1, Darwin25.4.0 arm64 - Authentication: ChatGPT
- Model/provider:
gpt-5.5with the built-inopenaiprovider
What issue are you seeing?
When Codex Desktop is launched from Finder/Dock on a Mac that requires a local proxy, conversations repeatedly show Reconnecting.... The response stream retries about every 15 seconds and eventually reaches retries 1/5 through 5/5.
In this environment:
- HTTP proxy:
http://127.0.0.1:10800 - SOCKS proxy:
socks5://127.0.0.1:10801 - Proxy variables originally existed only in
~/.zshrc
Terminal processes could use the proxy, but a GUI app launched by Finder/Dock did not reliably inherit the interactive shell environment. The Codex app-server therefore did not consistently route its requests through the local HTTP proxy.
Steps to reproduce
- Use a network where Codex/ChatGPT access requires a local proxy.
- Configure
HTTP_PROXY,HTTPS_PROXY, and related variables only in~/.zshrc. - Launch Codex Desktop from Finder or the Dock.
- Start a
gpt-5.5conversation. - Observe repeated Reconnecting... messages and
codex_core::responses_retryevents.
Feedback thread ID: 019f114e-c19d-70c2-94ab-f8d9f4266761
Confirmed workaround
Export the HTTP proxy into the per-user launchd environment, then fully quit and reopen Codex:
#!/bin/zsh
set -euo pipefail
proxy_url="${1:-http://127.0.0.1:10800}"
no_proxy_value="localhost,127.0.0.1,::1"
launchctl setenv HTTP_PROXY "$proxy_url"
launchctl setenv HTTPS_PROXY "$proxy_url"
launchctl setenv http_proxy "$proxy_url"
launchctl setenv https_proxy "$proxy_url"
launchctl setenv NO_PROXY "$no_proxy_value"
launchctl setenv no_proxy "$no_proxy_value"
[[ "$(launchctl getenv HTTP_PROXY)" == "$proxy_url" ]]
[[ "$(launchctl getenv HTTPS_PROXY)" == "$proxy_url" ]]
print "Codex GUI proxy configured: $proxy_url"
print "Fully quit and reopen Codex now."
To remove the workaround:
for key in HTTP_PROXY HTTPS_PROXY http_proxy https_proxy NO_PROXY no_proxy; do
launchctl unsetenv "$key"
done
launchctl setenv is session-scoped, so it may need to be applied again after logout or reboot.
Verification after applying the workaround
After fully quitting and reopening Codex:
- The app-server had an established TCP connection to
127.0.0.1:10800. - App transport initialized with
reconnectAttempt=0. - New
gpt-5.5requests completed successfully. - No new
codex_core::session::turnerrors appeared. - No new
codex_core::responses_retryevents appeared. codex doctor --jsonreported the Responses WebSocket handshake asHTTP 101 Switching Protocolswith provideropenai.
Important: an HTTP-only custom provider is not a valid workaround
I also tested a custom provider with supports_websockets = false. With gpt-5.5, this caused:
This model is not supported when using X-OpenAI-Internal-Codex-Responses-Lite.
That separate incompatibility is already tracked in #30224. Restoring the built-in openai provider and applying the launchd proxy environment was the working combination.
Expected behavior
Codex Desktop should either:
- honor the macOS system proxy configuration,
- expose a documented in-app proxy setting, or
- document that Finder/Dock launches require launchd environment variables.
A missing GUI proxy environment should also produce a direct network/proxy diagnostic instead of only repeated Reconnecting... messages.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗