Skip to content

[Bug]: ocx status reports the proxy healthy while routing is native, so nothing actually routes #2411

Description

@garysassano

Client or integration

Codex CLI

Area

Proxy and routing

Summary

ocx status reports the proxy running and healthy in a state where no routed request can succeed, because Codex is not pointed at the proxy. The user-visible error blames the model or the account, so the real cause is hard to find.

ocx doctor does detect the condition (routing=native). ocx status does not mention routing at all, and it is the command people run first.

Reproduction

  1. Get into the state: have a running proxy while ~/.codex/config.toml has no openai_base_url. This happens after ocx restore / ocx stop, or when the autostart shim is replaced by a version-manager reinstall of codex (filed separately as [Bug]: a package-manager reinstall of codex destroys the shim and its .opencodex-real backup, with no self-heal #2412).

  2. Ask ocx status whether things are working:

    ocx status
    ✅ Proxy: running (PID 59101)
       Health: http://127.0.0.1:10100/healthz ok (live)
    
  3. Confirm the proxy itself really is fine, by calling it directly:

    P=$(jq -r .port ~/.opencodex/runtime-port.json)
    curl -s -X POST localhost:$P/v1/responses \
      -H 'content-type: application/json' -H 'authorization: Bearer probe' \
      -d '{"model":"opencode-go/deepseek-v4-pro","input":"say ok","stream":false}' \
      | jq -r '.output[]?|select(.type=="message")|.content[0].text'
    ok
    
  4. Now make the same request through Codex:

    codex exec -m opencode-go/deepseek-v4-pro -s read-only --skip-git-repo-check \
      "Reply with exactly: ok" < /dev/null
    ERROR: The 'opencode-go/deepseek-v4-pro' model is not supported when using Codex with a ChatGPT account.
    

    That error reads as an auth or entitlement problem. It is neither — Codex sent the request to the real OpenAI endpoint, which does not know the namespaced model id.

  5. The two checks that actually discriminate:

    ocx doctor | grep -A2 'Codex restart safety'
    #   ok  native Codex routing (no opencodex restart dependency)
    #        routing=native, service=installed-but-unhealthy, shim=stale
    
    grep -c openai_base_url ~/.codex/config.toml
    # 0
  6. ocx restore back fixes it, adding exactly three lines and removing nothing:

    model_catalog_json = "/home/<user>/.codex/opencodex-catalog.json"
    # Auto-injected by opencodex
    openai_base_url = "http://127.0.0.1:10100/v1"

Expected: ocx status indicates that routing is native and that the running proxy is therefore unused.

Actual: ocx status shows only green proxy health, with no routing information.

Version

opencodex 2.29.0

Operating system

Ubuntu 24.04.4 LTS (WSL2, kernel 6.18.33.2-microsoft-standard-WSL2)

Provider and model

opencode-go / deepseek-v4-pro (any routed provider/model id reproduces it)

Logs or error output

$ ocx status
✅ Proxy: running (PID 59101)
   Health: http://127.0.0.1:10100/healthz ok (live)

$ codex exec -m opencode-go/deepseek-v4-pro "Reply with exactly: ok"
ERROR: The 'opencode-go/deepseek-v4-pro' model is not supported when using Codex with a ChatGPT account.

$ ocx doctor | grep -A2 'Codex restart safety'
Codex restart safety
  ok  native Codex routing (no opencodex restart dependency)
       routing=native, service=installed-but-unhealthy, shim=stale

Suggested fix: surface routing state in ocx status and warn on the healthy-proxy-plus-routing=native combination — ocx doctor already computes it. A more specific error when a namespaced provider/model id reaches the native OpenAI endpoint would also point at the real cause instead of the account.

Metadata

Metadata

Assignees

No one assigned

    Labels

    account-poolOAuth, credentials, Codex pool, quota, failover, plansbugSomething isn't workingcatalogModel catalog, slugs, visibility, routed entriescliCLI, config inject, packaging flagsproxyHTTP proxy, routing, reverse-proxy / management auth

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions