Fix Codex Reconnecting 1/5: Disable WebSocket via config.toml
Stop Codex “Reconnecting… 1/5” by switching Responses to HTTP streaming. Add chatgpt_http to ~/.codex/config.toml; keep models and API features.
If Codex keeps showing Reconnecting... 1/5, you can disable WebSocket for Responses.
Add this to ~/.codex/config.toml:
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
After that, the Codex app will start working over HTTP instead of WebSocket, and the reconnecting issue should go away.
After configuring this, it works globally without needing to launch it each time with the -c parameter, and it doesn’t affect the model’s capabilities (you can still use gpt-5.5 and the Responses API as usual.)
But it’s worth noting that when you disable WebSocket, it switches to the regular HTTP/streaming path, which can make the first token or event updates during the process arrive a bit more slowly.
If you often get reconnects, it’s usually more beneficial to disable it; if your network is already stable, it’s better to keep WebSocket for a smoother real-time experience. ️
Comments
Weekly digest
The best of vibe coding, AI agents and open source — once a week, no spam.
Related articles
All articlesCodex Comes to ChatGPT Mobile: Review, Guide, and Approve Work
Codex is rolling out in preview on iOS and Android. Review findings, adjust direction, approve next steps, and keep it running on your desktop.
OpenAI Frontier Models and Codex Now Available on AWS via Bedrock
OpenAI’s frontier models and Codex are now on AWS through Amazon Bedrock, enabling secure, compliant adoption with existing AWS governance and future integrations.
OpenAI Codex Build iOS Apps: Run, Preview, Hot Reload in One Place
Codex Build iOS Apps plugin runs iOS apps in Codex, opens SwiftUI Preview, and hot reloads changes—ending the copy-paste, build, screenshot loop.