feat(agent): Default Codex to the native app-server harness#2723
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
React Doctor found 2 issues in 2 files · 2 warnings. 2 warnings
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
f30123d to
da46d82
Compare
1a061f8 to
42759a0
Compare
42759a0 to
00acd92
Compare
00acd92 to
8899ff0
Compare
8899ff0 to
589557c
Compare
|
The selector defers onModelChange until the menu-close animation completes, so asserting synchronously after the click races that completion and flakes under CI timing. Wrap the assertion in waitFor. Generated-By: PostHog Code Task-Id: 6b58aa32-2ed1-4109-8538-cefba560626b
…e flag Run the agent live-model e2e job whenever a packages/ file changes (or this workflow changes) and unit + integration tests have passed, rather than requiring the AGENT_E2E_ENABLED variable. Keeps the fork guard since forks don't receive the gateway secret. Gateway env vars still gate the per-arm token guard and will be added separately. Generated-By: PostHog Code Task-Id: 6b58aa32-2ed1-4109-8538-cefba560626b
Gate the live e2e job on vars.E2E_GATEWAY_URL so it stays green on packages/ PRs until the gateway is configured, then activates automatically when the URL var and token secret are added. Prevents the fail-loud token guard from redding every packages/ PR before the gateway exists. Generated-By: PostHog Code Task-Id: 6b58aa32-2ed1-4109-8538-cefba560626b
…vars Map the org-level POSTHOG_CODE_E2E_* secret and variables onto the E2E_* env names the suite reads. Token is the secret (POSTHOG_CODE_E2E_GATEWAY_TOKEN); gateway URL and model/environment overrides are variables. The dormancy gate reads vars.POSTHOG_CODE_E2E_GATEWAY_URL, kept as a var because GitHub if: conditions can't read secrets. Generated-By: PostHog Code Task-Id: 6b58aa32-2ed1-4109-8538-cefba560626b
Generated-By: PostHog Code Task-Id: 6b58aa32-2ed1-4109-8538-cefba560626b
…nfigured Remove the vars.POSTHOG_CODE_E2E_GATEWAY_URL dormancy gate. The e2e job now runs on every packages/ change once unit + integration pass; if the POSTHOG_CODE_E2E_* secret/vars are missing, the fail-loud guard reds the run instead of skipping to green. Fork PRs remain skipped since they never get the secret. Generated-By: PostHog Code Task-Id: 6b58aa32-2ed1-4109-8538-cefba560626b
The suite now reads POSTHOG_CODE_E2E_* directly instead of the old E2E_* names, removing the confusing workflow remapping. The gateway token is POSTHOG_CODE_E2E_PERSONAL_API_KEY (org secret); URL, model, and environment overrides are POSTHOG_CODE_E2E_* org vars. Updated config, guard, driver, README, and run-e2e.sh to match, and the workflow passes them through unchanged. Generated-By: PostHog Code Task-Id: 6b58aa32-2ed1-4109-8538-cefba560626b
The longer POSTHOG_CODE_E2E_* names pushed several lines past the print width; apply biome's formatting so biome ci passes. Generated-By: PostHog Code Task-Id: 6b58aa32-2ed1-4109-8538-cefba560626b
Match the org secret name Josh configured (POSTHOG_CODE_E2E_GATEWAY_PERSONAL_API_KEY). Updated the workflow, config, guard, session-lifecycle, README, and run-e2e.sh accordingly. Paired with the existing POSTHOG_CODE_E2E_GATEWAY_URL variable. Generated-By: PostHog Code Task-Id: 6b58aa32-2ed1-4109-8538-cefba560626b
An empty POSTHOG_CODE_E2E_GATEWAY_URL falls back to localhost:3308, which is unreachable from a runner — every model turn dies with ConnectionRefused as 8 scattered failures. The guard now reds that misconfiguration as one clear failure naming the org variable to set. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
0e71608 to
af30578
Compare
The workflow only read vars.POSTHOG_CODE_E2E_GATEWAY_URL, so a URL stored as an org secret was invisible and every model turn failed with ConnectionRefused against the localhost fallback. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

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
This is part 1 of 2 in a stack made with GitButler: