Skip to content

feat: add optional Codex ACP backend with normalized traces#151

Open
surenny wants to merge 2 commits into
superdesigndev:mainfrom
surenny:feat/codex-acp-backend
Open

feat: add optional Codex ACP backend with normalized traces#151
surenny wants to merge 2 commits into
superdesigndev:mainfrom
surenny:feat/codex-acp-backend

Conversation

@surenny

@surenny surenny commented Jul 20, 2026

Copy link
Copy Markdown

Summary

  • add an opt-in Codex backend using pinned local acpx and @agentclientprotocol/codex-acp dependencies
  • normalize ACP JSON-RPC updates into Loopany activity, transcript steps, file artifacts, session identity, and token/context usage
  • display agent-neutral token metrics in run details and generate the correct codex exec resume command for Codex sessions
  • keep native codex exec --json as the default and immediate rollback path

Motivation

Loopany already supports multiple coding-agent CLIs, but each CLI exposes a different event/log format. The native Codex stream therefore has degraded progress, trace, and usage visibility compared with Claude Code. ACP gives the daemon a stable event surface while execution and prompts remain local.

This implementation uses one named ACP session per Loopany run, supports transient retry against that session, avoids runtime npx downloads, and parses strict JSON-RPC output from the local adapter.

Configuration

LOOPANY_CODEX_BACKEND=acp

Optional executable overrides remain available through LOOPANY_ACPX_BIN and LOOPANY_CODEX_ACP_BIN.

Validation

  • full daemon runner suite: 47/47 tests passed
  • ACP parser and transport suite: 8/8 tests passed
  • daemon TypeScript check passed
  • server resume-command suite: 6/6 tests passed
  • server TypeScript check passed

Follow-up direction

If this approach fits the project, the same boundary can evolve into an agent-neutral ACP transport so additional agent CLIs only need an ACP adapter rather than bespoke Loopany log parsers.

Copilot AI review requested due to automatic review settings July 20, 2026 13:59

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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