cpaua
·1 min10

Fix Codex Reconnecting 1/5: Disable WebSocket via config.toml

Fix Codex Reconnecting 1/5: Disable WebSocket via config.toml

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. ️

Share:
Author
cpaua

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

Comments

To leave a comment, log in or sign up
Loading...

Related articles