Feature Request: Add HTTPS-only Transport Option
Open 💬 4 comments Opened Jun 10, 2026 by itqiankun
Summary
Please add a way to force Codex to use HTTPS transport directly without attempting WebSocket connections first.
Problem
In some network environments (corporate proxies, Clash/Mihomo, VPNs, restricted networks), WebSocket connections frequently fail or time out.
Current behavior:
- Codex attempts WebSocket transport.
- Connection times out.
- Codex retries multiple times.
- Codex falls back to HTTPS.
- Request finally succeeds.
Example log:
Falling back from WebSockets to HTTPS transport
Reconnecting... 4/5
Request timed out
Although HTTPS works correctly, users must wait through several failed WebSocket attempts before the request is processed.
Expected Behavior
Allow users to explicitly disable WebSocket transport.
Examples:
codex --transport=https
or
transport = "https"
or
supports_websockets = false
Benefits
- Faster startup in restricted network environments.
- Better compatibility with enterprise proxies.
- Reduced connection delays.
- More predictable behavior.
Environment
- Codex CLI: v0.139.0
- Platform: macOS
- Network: Proxy / Clash environment
- HTTPS works correctly after WebSocket fallback.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗