codex - 💡(How to fix) Fix codex app-server proxy exits 0 with empty stdout/stderr instead of bridging stdio [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#23572Fetched 2026-05-20 03:48:10
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Author
Participants
Timeline (top)
labeled ×3commented ×1

Code Example

codex --version
# codex-cli 0.131.0

body='{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"proxy-repro","version":"0.0.0"}}}'
printf 'Content-Length: %d\r\n\r\n%s' "${#body}" "$body" >/tmp/codex-proxy-repro-in.log

codex app-server proxy \
  </tmp/codex-proxy-repro-in.log \
  >/tmp/codex-proxy-repro-out.log \
  2>/tmp/codex-proxy-repro-err.log

echo $?
wc -c /tmp/codex-proxy-repro-in.log /tmp/codex-proxy-repro-out.log /tmp/codex-proxy-repro-err.log

---

0
183 /tmp/codex-proxy-repro-in.log
0 /tmp/codex-proxy-repro-out.log
0 /tmp/codex-proxy-repro-err.log

---

codex app-server proxy --sock ~/.codex/app-server-control/app-server-control.sock \
  </tmp/codex-proxy-repro-in.log \
  >/tmp/codex-proxy-repro-sock-out.log \
  2>/tmp/codex-proxy-repro-sock-err.log

---

0
183 /tmp/codex-proxy-repro-in.log
0 /tmp/codex-proxy-repro-sock-out.log
0 /tmp/codex-proxy-repro-sock-err.log

---

HTTP/1.1 101 Switching Protocols
{"id":1,"result":{"userAgent":"t/0.131.0 (Arch Linux Rolling Release; x86_64) ghostty/1.3.1-arch2 (direct-ws-repro; 0.0.0)","codexHome":"/home/shuv/.codex","platformFamily":"unix","platformOs":"linux"}}
RAW_BUFFERClick to expand / collapse

What version of the Codex CLI are you using?

codex-cli 0.131.0

What platform is your computer?

Arch Linux, x86_64.

What issue are you seeing?

codex app-server proxy is documented by --help as:

Proxy stdio bytes to the running app-server control socket

In practice it silently consumes stdin, exits with status 0, and writes nothing to stdout or stderr. Passing the socket explicitly with --sock ~/.codex/app-server-control/app-server-control.sock behaves the same way.

This makes callers believe the proxy path succeeded even though no JSON-RPC response is ever returned. In Desktop-style launchers this turns into an app-server connection failure / initialize timeout even though the underlying app-server daemon is healthy.

Reproduction

With an app-server daemon listening on the default control socket:

codex --version
# codex-cli 0.131.0

body='{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"proxy-repro","version":"0.0.0"}}}'
printf 'Content-Length: %d\r\n\r\n%s' "${#body}" "$body" >/tmp/codex-proxy-repro-in.log

codex app-server proxy \
  </tmp/codex-proxy-repro-in.log \
  >/tmp/codex-proxy-repro-out.log \
  2>/tmp/codex-proxy-repro-err.log

echo $?
wc -c /tmp/codex-proxy-repro-in.log /tmp/codex-proxy-repro-out.log /tmp/codex-proxy-repro-err.log

Actual result:

0
183 /tmp/codex-proxy-repro-in.log
0 /tmp/codex-proxy-repro-out.log
0 /tmp/codex-proxy-repro-err.log

The same result happens when the socket is passed explicitly:

codex app-server proxy --sock ~/.codex/app-server-control/app-server-control.sock \
  </tmp/codex-proxy-repro-in.log \
  >/tmp/codex-proxy-repro-sock-out.log \
  2>/tmp/codex-proxy-repro-sock-err.log
0
183 /tmp/codex-proxy-repro-in.log
0 /tmp/codex-proxy-repro-sock-out.log
0 /tmp/codex-proxy-repro-sock-err.log

Expected behavior

Either:

  1. codex app-server proxy should bridge Content-Length-framed stdio JSON-RPC to the app-server control socket and return the initialize response, or
  2. it should fail non-zero with a diagnostic explaining why it cannot proxy.

Evidence that the daemon/socket is healthy

A direct WebSocket upgrade against ~/.codex/app-server-control/app-server-control.sock, followed by a masked text frame containing the same initialize JSON-RPC payload, succeeds:

HTTP/1.1 101 Switching Protocols
{"id":1,"result":{"userAgent":"t/0.131.0 (Arch Linux Rolling Release; x86_64) ghostty/1.3.1-arch2 (direct-ws-repro; 0.0.0)","codexHome":"/home/shuv/.codex","platformFamily":"unix","platformOs":"linux"}}

So the bug appears isolated to the app-server proxy stdio-to-WebSocket bridge path, not to the daemon or the control socket.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Either:

  1. codex app-server proxy should bridge Content-Length-framed stdio JSON-RPC to the app-server control socket and return the initialize response, or
  2. it should fail non-zero with a diagnostic explaining why it cannot proxy.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix codex app-server proxy exits 0 with empty stdout/stderr instead of bridging stdio [1 comments, 2 participants]