`codex app-server` fails with 503 while `codex exec` works

Resolved 💬 3 comments Opened Mar 9, 2026 by sorryhyun Closed Mar 10, 2026

What version of the Codex App are you using (From “About Codex” dialog)?

0.112.0

What subscription do you have?

plus

What platform is your computer?

WSL2

What issue are you seeing?

codex app-server fails to connect to the upstream OpenAI API with a 503 error, while codex exec works normally.

What steps can reproduce the bug?

codex exec — works

$ codex exec 'say hi'
OpenAI Codex v0.112.0 (research preview)
model: gpt-5.4
...
codex
hi

codex app-server — fails

The app-server spawns and accepts local WebSocket connections from clients. The JSON-RPC initialize handshake, thread/start, and turn/start all succeed. However, when the app-server tries to connect upstream to OpenAI's backend, it fails:

[codex app-server stderr] 2026-03-09T06:25:33.432133Z ERROR codex_api::endpoint::responses_websocket:
  failed to connect to websocket: HTTP error: 503 Service Unavailable,
  url: wss://chatgpt.com/backend-api/codex/responses

The user message is received and echoed back (item/started, item/completed for userMessage), but no assistant response is generated because the upstream connection fails.

Analysis

  • codex exec and codex app-server appear to use different upstream endpoints. exec presumably uses the REST API (which is working), while app-server uses a WebSocket endpoint at wss://chatgpt.com/backend-api/codex/responses (which returns 503).
  • The local WebSocket transport between the client and app-server is fine — the issue is entirely on the app-server → OpenAI upstream leg.
  • This is likely an OpenAI-side outage or a deprecated endpoint.

What is the expected behavior?

codex app-server should connect to the upstream API and stream assistant responses back to the client, the same way codex exec does.

Additional information

_No response_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗