Repository navigation
Description
What version of the Codex App are you using (From “About Codex” dialog)?
26.1123.101703 (bundled codex-cli 0.173.0-alpha.4.1)
What subscription do you have?
ChatGPT sign-in. The tier should not matter here: the failure happens before any request leaves the machine.
What platform is your computer?
Darwin 25.6.0 arm64 (macOS, Apple Silicon)
What issue are you seeing?
Every thread hung on "Reconnecting… waiting for network" indefinitely, while the internet connection, chatgpt.com and api.openai.com were all reachable from the same machine.
The actual cause was local. ~/.codex/config.toml contained:
model_catalog_json = "~/.codex/ollama-launch-models.json"
openai_base_url = "http://127.0.0.1:11434/api/codex/v1"These two lines were added by ollama launch chatgpt (Ollama 0.40.19), which routes all Codex traffic, including first-party models such as gpt-6.2-sol, through Ollama's local proxy. When the Ollama app quits, nothing listens on port 11434 and every request fails instantly with connection refused.
Codex reports this as a generic network problem. Neither the UI nor the logs mention the URL it is trying to reach, or that the URL is a user-configured override on loopback:
ERROR codex_api::endpoint::responses_websocket failed to connect to Responses WebSocket stage=Unknown (provider=OpenAI)
WARN codex_core::client falling back to HTTP
WARN codex_core::responses_retry stream connection failed; waiting to retry error=Connection failed: error sending request retry_delay=60s
Timeline from the Ollama and Codex logs:
- 15:00:28.103: Ollama
app.logrecords "shutting down ollama server" - 15:00:28: first Codex
connection_error - 15:00:31 onward: 120+
responses_retrywarnings over the next 28 minutes, back-off settling at 60s, never a terminal error
Direct checks during the outage (no credentials sent): https://chatgpt.com/ returned 200, https://api.openai.com/v1/models returned 401, http://127.0.0.1:11434/ refused the connection.
Removing the two lines from config.toml resolved it.
What steps can reproduce the bug?
- Install Ollama and run
ollama launch chatgptonce (or addopenai_base_url = "http://127.0.0.1:11434/api/codex/v1"to~/.codex/config.tomlby hand). - Quit the Ollama app.
- Send any message in the Codex app.
What is the expected behavior?
- When the failing endpoint is a non-default
openai_base_url, say so. For example: "Can't reach the model endpoint configured in config.toml (http://127.0.0.1:11434/…): connection refused." - Treat connection refused on loopback as a configuration error rather than a transient network outage, and fail fast instead of retrying forever under "waiting for network".
- Include the target host and the underlying OS error in the
responses_retryandresponses_websocketlog lines.stage=Unknownand "error sending request" give nothing to go on. - Optionally, show in the model picker or settings that a base-URL override is active.
Additional information
A commenter on #43899 identified the same cause in September, so part of that catch-all thread is likely this case. Filing separately because the ask here is specific: the message and retry behaviour for an unreachable custom base URL.
Activity
github-actions commentedon Dec 3, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action