Fixing Codex Reconnecting Errors by Disabling WebSocket

Learn how to resolve the 'Reconnecting... 1/5' error in Codex by switching from WebSocket to HTTP in the configuration file.

cpaua1 min9,858
Fixing Codex Reconnecting Errors by Disabling WebSocket

Users experiencing persistent "Reconnecting... 1/5" errors in Codex can resolve the issue by disabling the WebSocket for Responses, according to the channel author. This change forces the application to communicate via HTTP, which eliminates the reconnection loop while maintaining access to the Responses API and the gpt-5.5 model.

To implement this fix, the following configuration must be added to the ~/.codex/config.toml file:

code
model_provider = "chatgpt_http"

[model_providers.chatgpt_http]
name = "ChatGPT HTTP"
base_url = "https://chatgpt.com/backend-api/codex"
wire_api = "responses"
requires_openai_auth = true
supports_websockets = false

This configuration applies globally, removing the need to use the -c parameter during launch. While this solves connectivity issues, the author notes that switching to a standard HTTP/streaming path may result in slightly slower delivery of the first token or process event updates compared to the real-time experience of a stable WebSocket connection. This adjustment is recommended for those with unstable networks, whereas users with stable connections should keep the default settings.

Related reading

Sources

chatgpt.com — content not available without authorization

Share

Author

cpaua

VibeCode blog admin. Writing about vibe coding, AI and open source.

Related news

Comments

To leave a comment, log in
Loading...

Weekly digest

The best of vibe coding, AI agents and open source — once a week, no spam.