Harnesses

Codex CLI

OpenAI's CLI. codex exec with a native read-only sandbox, TOML config with comments preserved on edit, sessions as JSONL plus a SQLite state database.
getHarness
getHarness("codex")
binary
codex
invoke modes
4 of 6 · official
model listing
no
mcp config
toml · standard
agents file
~/.codex/AGENTS.md

Codex keeps its configuration in TOML, and people write comments in TOML. addMcpServer and removeMcpServer therefore edit config.toml surgically instead of parsing and serializing it again, and the comments survive. The project file is searched from the working directory up to the .git boundary, which the note on that entry says because it is not what the path alone suggests.

codex exec --sandbox read-only is a sandbox the CLI enforces, so readOnly: true is a real mode here. codex exec cannot switch its tools off, so there is no advisor; ask for one and the error tells you to retry with tools: true. Detection is by project markers only, AGENTS.md among them, which is why a directory with both a CLAUDE.md and an AGENTS.md detects as nothing rather than as Codex.

Capabilities and invocation

mcp: yesvision: yesaudio: novideo: notools: yesstreaming: yes

Binary codex, evidence official. Non-interactive exec subcommand; add --json for structured output. Model selection appends --model {model}.

advisor

{}

rejected

advisor · json

{ structured: true }

rejected

read-only

{ readOnly: true }

exec --skip-git-repo-check --sandbox read-only {prompt}

read-only · json

{ readOnly: true, structured: true }

exec --skip-git-repo-check --sandbox read-only --json {prompt}

agent

{ tools: true }

exec --skip-git-repo-check {prompt}

agent · json

{ tools: true, structured: true }

exec --skip-git-repo-check --json {prompt}

Paths

Templates as the registry stores them. ~, ${HOME} and %VAR% expand in resolve(); entries tagged with a platform are dropped on the others. Open in the explorer to see them expanded for a home directory of your choice.

config

  • ~/.codex/config.tomluser · official · all
  • .codex/config.tomlproject · official · allSearched from cwd up to project root (.git boundary).
  • /etc/codex/config.tomlsystem · official · linux, darwin

sessions

  • ~/.codex/sessions/data · official · allSession rollouts in JSONL format, organized by date.
  • ~/.codex/history.jsonldata · official · allCommand history.
  • ~/.codex/state_5.sqlitedata · official · allSQLite state database for threads and agent state.

instructions

  • AGENTS.mdproject · official · all
  • AGENTS.override.mdproject · official · allLocal override, takes precedence over AGENTS.md.
  • ~/.codex/AGENTS.mduser · official · allGlobal user-level instructions.
  • ~/.codex/AGENTS.override.mduser · official · allGlobal override, takes precedence over global AGENTS.md.

skills

  • .codex/skills/project · official · all
  • .agents/skills/project · official · all
  • ~/.codex/skills/user · official · allDeprecated, use ~/.agents/skills/ instead.
  • ~/.agents/skills/user · official · all
  • /etc/codex/skills/system · official · linux, darwin

empty

commandshooks No known location. That is not the same as the feature being missing.

MCP servers

~/.codex/config.tomluser · toml · standard · mcp_servers
.codex/config.tomlproject · toml · standard · mcp_servers

Detection

envVars

None. Detection is by project markers only.

projectMarkers

.codexAGENTS.mdAGENTS.override.md.agents/skills

Persistence

  • TOML - Configuration files. (official)
  • JSONL - Conversation transcripts. (official)
  • SQLite - Thread and agent state. (official)

syncAgentsFiles links ~/.codex/AGENTS.md to the master bundle.

@agntn/harnesses·MIT license· Paths follow the upstream CLIs and carry their evidence level. This site reads nothing from your machine.