Skip to content

"Reconnecting… waiting for network" shown when openai_base_url points at a local proxy that is down; error never names the endpoint #65462

Backlog

Description

@soumen02

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.log records "shutting down ollama server"
  • 15:00:28: first Codex connection_error
  • 15:00:31 onward: 120+ responses_retry warnings 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?

  1. Install Ollama and run ollama launch chatgpt once (or add openai_base_url = "http://127.0.0.1:11434/api/codex/v1" to ~/.codex/config.toml by hand).
  2. Quit the Ollama app.
  3. 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_retry and responses_websocket log lines. stage=Unknown and "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

  1. added
    bug
    app
    connectivity
    config
    on Dec 3, 2026
  2. github-actions commented on Dec 3, 2026

    @github-actions
    Contributor

    Potential duplicates detected. Please review them and close your issue if it is a duplicate.

    Powered by Codex Action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appbugconfigconnectivity

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions