Skip to content

readiness: Codex re-auth failure takes healthy multi-provider proxy out of service #5181

Description

@nordz0r

Client or integration

Direct HTTP/API client

Area

Service lifecycle

Summary

When one or more Codex OAuth pool accounts require re-authentication, OpenCodex reports /readyz as HTTP 503 even though the proxy process is running and other configured providers/routes remain usable. In a single-replica Kubernetes deployment, the readiness failure removes the only Service endpoint and makes the entire proxy inaccessible.

Expected: Codex account-pool degradation should be reported as a component/provider failure. The proxy should remain ready when its HTTP server is healthy and at least one route/provider can serve traffic; native Codex traffic can fail or be marked degraded independently.

Reproduction

  1. Run OpenCodex in a container/Kubernetes pod with multiple providers and a Codex account pool.
  2. Leave one or more Codex accounts expired so they require re-authentication.
  3. Start the proxy and query /healthz and /readyz.
  4. Observe /healthz and the proxy listener become available, while /readyz returns 503 and Kubernetes marks the pod unready.
  5. With a single replica, the Service has no ready endpoint even though non-Codex provider routes are configured.

Version

v2.59.0 (nordz0r/opencodex image)

Operating system

Debian 12 / Kubernetes (single-node k3s)

Provider and model

Codex account pool; other configured providers include Anthropic, Google Antigravity, OpenAI, and xAI routes.

Logs or error output

🚀 opencodex proxy running on http://localhost:10100
GET /healthz      → health check
GET /api/*        → management API
[opencodex] catalog sync: ... Codex accounts ... need reauthentication

GET /readyz -> 503
Kubernetes: Startup probe failed: HTTP probe failed with statuscode: 503
Pod: Running, 0/1 Ready, no process crash

After changing the Kubernetes probe to /healthz, the pod becomes 1/1 Ready; authenticated catalog and non-Codex inference checks succeed while the Codex pool remains partially degraded. This indicates the process is viable and the account-pool state is too broad a readiness gate.

Screenshots and supporting files

Not applicable.

Redacted configuration

{
  "deployment": "single replica",
  "readinessProbe": "/readyz",
  "livenessProbe": "/healthz",
  "codexPool": "multiple OAuth accounts, some requiring re-authentication",
  "otherRoutes": "configured non-Codex providers"
}

Checks

  • I searched existing issues and documentation.
  • I removed secrets, tokens, account details, request credentials, and personal data.

Activity

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

    account-poolOAuth, credentials, Codex pool, quota, failover, plansbugSomething isn't workingserviceService lifecycle (WinSW/launchd/scheduler)

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions