OpenAI Codex CLI
The OpenAI Codex CLI harness (codex) runs Codex non-interactively with codex exec --json. Jimothy parses its JSONL event stream, so you see commands, file changes and reasoning live, and token usage is recorded per step. The built-in Feature template uses Codex for its cross-model review step.
Install and sign in
Section titled “Install and sign in”npm i -g @openai/codexcodex login # or set OPENAI_API_KEYcodex --versionThen click Re-detect on the Harnesses page.
Default configuration
Section titled “Default configuration”| Field | Default |
|---|---|
| Command | codex |
| Arguments | exec --json --full-auto --skip-git-repo-check {{options}} - |
| Model arguments | --model {{model}} |
| System prompt arguments | none (the system prompt is prepended to the prompt) |
| Subagent arguments | none (subagents are ignored, with a note in the log) |
| Prompt delivery | stdin |
| Output format | Codex exec –json (codex-json) |
| Version check args | --version |
| Model list source | Command: debug models |
| Models | gpt-6-astra, gpt-6-sol, gpt-6-luna, gpt-5.6-sol, gpt-5.6-terra, gpt-5.6-luna, gpt-5.5 |
| Default model | gpt-6-sol |
The {{options}} line marks where model arguments go, so with a model selected a step runs:
codex exec --json --full-auto --skip-git-repo-check --model gpt-6-sol - < promptThe trailing - tells Codex to read the prompt from stdin. --skip-git-repo-check lets Codex run in workspaces that aren’t git repositories (the Empty folder and Existing folder workspace modes).
What you see in the logs
Section titled “What you see in the logs”| Codex event | Log line |
|---|---|
thread.started |
thread <id> (stored as the step’s session id) |
item.started for a command |
$ <command> |
item.completed command |
exit <code> plus the command output (clipped at 1,500 chars); non-zero exits are shown as errors |
| agent message | assistant text |
| reasoning | thinking |
| file change | edit add src/a.ts, update src/b.ts |
| MCP tool call | mcp <server>.<tool> |
| web search | web search: <query> |
turn.completed |
turn completed · N in / M out tokens |
turn.failed / error |
error, and the step fails |
The step Output is the last agent message.
Tokens, not cost
Section titled “Tokens, not cost”Codex reports tokens (input, output, cached input) per turn, and Jimothy sums them for the step. It does not report a dollar cost, so Codex steps add $0 to the run’s cost figures.
Models
Section titled “Models”Click Models on the Codex card (or Fetch latest in the editor) to run codex debug models and replace the model list with what your installed Codex offers. Entries marked hidden in that catalog are skipped, and the rest are sorted by Codex’s priority.
Using Codex as a reviewer
Section titled “Using Codex as a reviewer”A typical review step prompt asks for a verdict line, and the step’s Pass if output matches (regex) is VERDICT:\s*APPROVE with On failure, loop back to the implement step. Codex’s final message becomes {{steps.review.output}}, which the implementer’s prompt can include on the next pass. See Loops & verdicts.