feat(agent): Default Codex to the native app-server harness#2723
feat(agent): Default Codex to the native app-server harness#2723charlesvien wants to merge 6 commits into
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
|
f544874 to
2ee0938
Compare
Prompt To Fix All With AIFix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
packages/agent/src/adapters/codex-app-server/app-server-client.ts:104-106
**Unexpected process exit leaves pending promises hanging forever**
When the codex process crashes, the stdout stream closes and `readLoop` detects `done` and exits silently. At that point `AppServerClient.pending` still holds any in-flight RPC requests, and more critically `CodexAppServerAgent.pendingTurnResolve` is still set (waiting for `turn/completed` that will never arrive). Neither is ever rejected, so `prompt()` hangs indefinitely.
`close()` already does the right thing — rejects all `pending` calls and clears state — but it is never triggered by a transport EOF. The loop should call `void this.close()` (or a dedicated `onClose` callback) when `done` is `true` and `!this.closed`.
Reviews (2): Last reviewed commit: "default codex to native app-server harne..." | Re-trigger Greptile |
688d6b1 to
ad5cb12
Compare
2ee0938 to
7abe5de
Compare
ad5cb12 to
317c21a
Compare
7abe5de to
2028e4b
Compare
2028e4b to
f30123d
Compare
f30123d to
da46d82
Compare

Problem
Codex ran through the Zed codex-acp ACP adapter, an extra translation layer that weakens native Codex capabilities (thread resume/fork, typed item and tool events, detailed usage, structured outputs, approvals).
Changes
codexCLI binary (download-binaries + vite copy)CodexAppServerAgentspeaking Codex's native app-server JSON-RPC under an unchanged ACP surfacecreateAcpConnectionto the native agent, withPOSTHOG_CODEX_USE_ACP=1to fall back to codex-acpHow did you test this?
Manually
Automatic notifications