Skip to content

Added Codex CLI agent integration, full test coverage (blocked on #281).#271

Draft
akshan-main wants to merge 1 commit intoentireio:mainfrom
akshan-main:add-codex-cli-agent
Draft

Added Codex CLI agent integration, full test coverage (blocked on #281).#271
akshan-main wants to merge 1 commit intoentireio:mainfrom
akshan-main:add-codex-cli-agent

Conversation

@akshan-main
Copy link

@akshan-main akshan-main commented Feb 11, 2026

Closes #245

Registers a codexcli agent package following the same pattern as claudecode and geminicli (self-registration via init(), full Agent interface, TranscriptAnalyzer, TranscriptChunker).

Streaming JSONL parser that extracts thread ID, messages, commands, file changes, and token usage, made tolerant of unknown event types so it won't break when Codex adds new ones.

entire codex exec [flags] -- with --model and --sandbox flags.

Uses the shared DetectFileChanges, FilterAndNormalizePaths, cleanPromptForCommit, and GetGitAuthor; no new abstractions.

  • Wrapper not hooks: Codex doesn't expose a lifecycle hook system. The wrapper captures the complete JSONL stream in one shot via codex exec --json, then creates a checkpoint through strategy.SaveChanges().
  • Same checkpoint path: SaveContext construction, file change detection, path normalization, and commit message generation all reuse existing shared functions.
  • Hard error on checkpoint failure: Consistent with how Claude Code's Stop hook and Gemini's AfterAgent hook handle SaveChanges errors.
  • SupportsHooks() returns false: ParseHookInput returns an error stub. The wrapper command replaces the hook lifecycle entirely.

Commands:

entire codex exec [flags] --

--model, -m — Override the Codex model (e.g., 4o)
--sandbox, -s— Sandbox policy (read-only, workspace-write, danger-full-access)

Usage examples:

entire codex exec -- "fix the failing tests"
entire codex exec -m 4o -- "refactor the auth module"
echo "add error handling" | entire codex exec -- -
There's no entire codex start, entire codex stop, entire codex resume, etc., because Codex CLI doesn't have a lifecycle hook system like Claude Code does. The wrapper command runs the full session in one shot: execute Codex, capture the JSONL, save the checkpoint.

This is what user sees in terminal:

Running: codex exec --json ... (stderr)
Codex runs silently (JSONL captured to temp file only)
Saved transcript to: ... (stderr)
Files modified (N): ... (stderr)
Checkpoint saved. (stderr)
Codex's last message/summary printed to stdout

thank you for entire and congratulations on the seed raised

would be great if this can be reviewed, any feedback is welcome @Soph @gtrrz-victor @khaong

@akshan-main akshan-main requested a review from a team as a code owner February 11, 2026 17:48
@akshan-main akshan-main changed the title Add Codex CLI agent integration Added minimal Codex CLI agent integration Feb 11, 2026
@akshan-main akshan-main changed the title Added minimal Codex CLI agent integration Added Codex CLI agent integration Feb 11, 2026
Registers a codexcli agent package following the same pattern as
claudecode and geminicli (self-registration via init(), full Agent
interface, TranscriptAnalyzer, TranscriptChunker).

Streaming JSONL parser that extracts thread ID, messages, commands,
file changes, and token usage, made tolerant of unknown event types
so it won't break when Codex adds new ones.

entire codex exec [flags] -- <prompt> with --model and --sandbox flags.

Uses the shared DetectFileChanges, FilterAndNormalizePaths,
cleanPromptForCommit, and GetGitAuthor — no new abstractions.
@akshan-main akshan-main changed the title Added Codex CLI agent integration Added Codex CLI agent integration, full test coverage Feb 11, 2026
@akshan-main akshan-main mentioned this pull request Feb 12, 2026
@akshan-main akshan-main changed the title Added Codex CLI agent integration, full test coverage Added Codex CLI agent integration, full test coverage (blocked on #281). Feb 12, 2026
@akshan-main akshan-main marked this pull request as draft February 12, 2026 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Codex support

1 participant