Skip to content

[codex] add codex cli execution backend#2

Draft
jonaswre wants to merge 1 commit into
mainfrom
codex/codex-cli-backend
Draft

[codex] add codex cli execution backend#2
jonaswre wants to merge 1 commit into
mainfrom
codex/codex-cli-backend

Conversation

@jonaswre

Copy link
Copy Markdown
Owner

Summary

Adds OpenAI Codex CLI as a first-class Pilot execution backend alongside Claude Code, Qwen Code, and OpenCode.

Changes

  • Adds codex-cli backend type and executor.codex_cli configuration.
  • Implements a Codex CLI subprocess backend using codex exec --json.
  • Normalizes Codex JSONL events into Pilot backend events.
  • Supports model routing, reasoning effort mapping, session resume, heartbeat/watchdog handling, stderr diagnostics, RSS telemetry, and backend error classification.
  • Wires Codex CLI into backend factory, preflight, doctor health checks, pilot backend commands, and onboarding.
  • Updates example config and docs for prerequisites, configuration, and backend comparison.
  • Adds unit and fake-subprocess coverage for Codex command construction, event parsing, error classification, factory/config behavior, CLI backend UX, and preflight mapping.

Validation

env -u ANTHROPIC_API_KEY -u ANTHROPIC_AUTH_TOKEN -u CLAUDE_CODE_OAUTH_TOKEN -u OPENAI_API_KEY -u CODEX_API_KEY \
  go test ./internal/executor ./cmd/pilot ./internal/config ./internal/health ./internal/wiring

Passed locally.

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.

1 participant