Skip to content

feat(codex)!: remove the codex-acp harness, app-server is the only codex adapter#3198

Merged
joshsny merged 1 commit into
mainfrom
feat/codex-app-server-only
Jul 6, 2026
Merged

feat(codex)!: remove the codex-acp harness, app-server is the only codex adapter#3198
joshsny merged 1 commit into
mainfrom
feat/codex-app-server-only

Conversation

@joshsny

@joshsny joshsny commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Problem

Codex sessions could run through two harnesses: the native codex app-server adapter (flag-gated default-on) and the legacy codex-acp adapter as a silent fallback. The fallback is now a liability rather than a safety net: whenever the selector's inputs wobble (native binary not yet resolvable, flag not loaded), sessions silently land on codex-acp, which deadlocks with current codex models — the session does a minute of work and hangs forever. We hit exactly this in eval runs today: the first wave of sandboxes fell back to codex-acp and burned a 30-minute timeout each, while every later wave selected app-server and ran fine.

Changes

  • Delete the codex-acp adapter entirely (adapters/codex/: CodexAcpAgent, client, spawn, session state, its structured-output/local-tools MCP server entries) and the acp-vs-app-server parity suite, which existed only to compare the two.
  • Move the shared CodexSettingsManager and codex model catalog into adapters/codex-app-server/.
  • Remove the codex-app-server feature flag and all useCodexAppServer plumbing: sessionService flag resolution and adapter-store pinning, workspace-server schemas, agent options, and the POSTHOG_CODEX_USE_APP_SERVER / POSTHOG_CODEX_USE_ACP env overrides. A codex session always uses the app-server adapter; a missing native binary now throws with a clear message instead of degrading.
  • Stop downloading and staging the codex-acp binary (~80MB per platform).
  • Compatibility: the bundle directory keeps its codex-acp name so electron-builder config, CI verify steps, and unrebased branches keep working, and nativeCodexBinaryPath still accepts the old "sibling binary" hint so older sandbox images that pass the codex-acp path keep resolving the native binary.

Breaking for in-flight codex-acp sessions: after upgrading, an existing codex session created by the acp harness resumes under app-server and will not retain its thread history. Given codex sessions were flag-gated to app-server already, the affected set is sessions created while the flag was off.

How did you test this?

  • tsc --noEmit: 0 errors across @posthog/agent, @posthog/core, @posthog/ui, @posthog/shared, @posthog/workspace-server, and apps/code.
  • Test suites: agent 1079 passed, core 2115 passed (1 pre-existing locale-dependent billing date-format failure, unrelated — no billing files touched), workspace-server 622 passed, shared 453 passed, ui sessions feature 347 passed.
  • Deleted the selector precedence tests along with the selector; the fail-loud missing-binary path is covered by the e2e guard that asserts the native binary is present when a token is set.
  • Repo-wide sweep: zero remaining references to CodexAcpAgent, useCodexAppServer, or the env overrides.

Automatic notifications

  • Publish to changelog?
  • Alert Sales and Marketing teams?

🤖 Agent context

Follow-up to the app-server rollout (#2723) and the native binary packaging fix (#3188). Requested as "remove the codex-acp harness completely, and we will just use the app server one". The eval-run fallback incident that motivated failing loudly is described under Problem.

🤖 Generated with Claude Code

@trunk-io

trunk-io Bot commented Jul 6, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

@greptile-apps

greptile-apps Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Reviews (1): Last reviewed commit: "feat(codex)!: remove the codex-acp harne..." | Re-trigger Greptile

Comment thread packages/agent/src/adapters/codex-app-server/binary-path.ts
@joshsny joshsny force-pushed the feat/codex-app-server-only branch from 8d22c8f to 9ab595a Compare July 6, 2026 19:59
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit 318b26b.

@joshsny joshsny requested a review from a team July 6, 2026 20:02
@joshsny joshsny force-pushed the feat/codex-app-server-only branch from 9ab595a to 5c07861 Compare July 6, 2026 20:06
…dex adapter

The native app-server adapter has been the default for codex sessions
and codex-acp existed only as a flag-gated fallback. That fallback is a
liability: when the selector's inputs wobble (missing binary, unresolved
flag) sessions silently land on codex-acp, which deadlocks with current
models instead of failing visibly.

- delete the codex-acp adapter (CodexAcpAgent, its client, spawn, MCP
  server entries) and the acp-vs-app-server parity suite
- move the shared CodexSettingsManager and model catalog into the
  codex-app-server directory
- drop the codex-app-server feature flag, the useCodexAppServer
  plumbing (sessionService, workspace-server schemas, adapter-store
  pinning), and the POSTHOG_CODEX_USE_APP_SERVER / POSTHOG_CODEX_USE_ACP
  env overrides; a codex session always uses the app-server adapter and
  a missing native binary now fails loudly
- stop downloading and staging the codex-acp binary (~80MB per
  platform); the bundle dir keeps its name so packaging config, CI
  verify steps, and older sandbox images stay compatible, and
  nativeCodexBinaryPath still accepts a sibling-binary hint from hosts
  that pass the old path

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@joshsny joshsny force-pushed the feat/codex-app-server-only branch from 5c07861 to 318b26b Compare July 6, 2026 20:08
@joshsny joshsny merged commit df9a4cc into main Jul 6, 2026
30 of 34 checks passed
@joshsny joshsny deleted the feat/codex-app-server-only branch July 6, 2026 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants