Covendocs
HarnessesCodex Harness

Codex Harness

Codex harness deep dive: setup, provider auth, launch arguments, project-root behavior, and troubleshooting.

1 min read

Codex is OpenAI's coding-agent CLI. Coven launches it as a project-rooted PTY and records the run as a Coven session.

FieldValue
Harness idcodex
Executablecodex
Installnpm install -g @openai/codex
Provider authcodex login
First runcoven run codex "fix the failing tests"

Setup

npm install -g @openai/codex
codex login
coven doctor

coven doctor checks that codex is available on PATH. It does not read Codex's OpenAI credentials.

Launch

coven run codex "audit this repo" --cwd packages/cli --title "CLI audit"

In interactive terminals, Coven launches Codex with the prompt as the final argument. In non-interactive mode, Coven uses Codex's exec --skip-git-repo-check --color never shape so output is easier to capture.

Supervision flow

Rendering diagram…

Common failures

SymptomLikely causeFix
coven doctor reports Codex missingcodex is not on daemon PATHInstall Codex, restart daemon, rerun doctor.
Codex asks for loginOAuth state expired or missingRun codex login.
Launch rejects cwd--cwd escapes the project rootUse a cwd inside the project.

For shared setup rules, see Install harness CLIs and Provider auth boundary.

Was this page helpful?No

Last updated on

On this page