Expand description
OpenAI Codex (codex) as a Harness.
Same process-spawn shape as the bob and Claude adapters — a
different binary, flags, and stdout parser. We invoke
codex exec --json and parse its JSONL into the shared
normalized crate::RunEvent stream.
Auth: like Claude Code, Codex manages its own credentials (its
codex login / ChatGPT auth or its own OPENAI_API_KEY in the
environment), so Compose does not store or inject a key —
credential().required is false.
The stdout wire format and its decode — including the stateful
CodexStreamParser that resolves codex’s preamble-vs-answer
ambiguity — live in [parser].
Structs§
- Codex
Harness - OpenAI Codex CLI as a
Harness. - Codex
Stream Parser - Stateful per-run wrapper over
parse_codex_linethat resolves codex’s preamble-vs-answer ambiguity and drops its stderr noise. One per run.
Constants§
- CODEX_
HARNESS_ ID - Registry id for the Codex harness.
Functions§
- parse_
codex_ line - Parse one line of
codex exec --jsonJSONL into the sharedParsedLine. Assistant text is the fullagent_messageonitem.completed; tool items (command_execution,file_change,web_search,mcp_tool_call) become structured tool cards (ToolStart/ToolEnd). Codex edits files directly via tools (reflected on disk by the file watcher), so it never emits suggested-edit previews —editsstays empty.