Summary
ao review run <session> --execute (without an explicit --command) silently fails when the codex CLI is not installed. The review run is recorded as status: failed with 0 open findings and terminationReason: "Codex review failed: spawn codex ENOENT".
This is problematic because:
- The default reviewer hard-assumes
codex is on PATH; there is no preflight check or actionable error at the CLI ("codex not found — install it or pass --command").
- A
failed run with 0 findings is easy to misread as a clean review (no findings) rather than the reviewer never ran. An orchestrator looping over runs can mistakenly treat it as mergeable.
- There's no config-level way to set a default reviewer command, so every
ao review run must pass --command to use a non-codex reviewer.
Environment
@aoagents/ao 0.9.4
codex not installed (spawn codex ENOENT)
- Linux
Repro
- On a host without
codex on PATH, open a PR from a worker session.
ao review run <session> --execute
ao review list <project> → … failed … 0 open findings …
- Inspect the run JSON →
terminationReason: "Codex review failed: spawn codex ENOENT".
Suggestions
- Preflight: detect missing
codex before starting and exit with a clear, actionable message (and a non-zero CLI exit).
- Distinguish states: a reviewer that never produced output should not look like
failed + 0 findings; consider a distinct errored/reviewer_unavailable status so automation doesn't confuse it with a clean review.
- Configurable default reviewer: support a
reviewer.command (or defaults.reviewerCommand) in config.yaml so a custom reviewer can be used without passing --command on every run.
- Optionally document the expected
--command stdout contract ({"findings":[{severity,title,body,filePath,startLine,endLine,confidence}]}; {"findings":[]} = clean) in the help text, since it's currently only discoverable from source.
Summary
ao review run <session> --execute(without an explicit--command) silently fails when thecodexCLI is not installed. The review run is recorded asstatus: failedwith0 open findingsandterminationReason: "Codex review failed: spawn codex ENOENT".This is problematic because:
codexis onPATH; there is no preflight check or actionable error at the CLI ("codex not found — install it or pass--command").failedrun with0 findingsis easy to misread as a clean review (no findings) rather than the reviewer never ran. An orchestrator looping over runs can mistakenly treat it as mergeable.ao review runmust pass--commandto use a non-codex reviewer.Environment
@aoagents/ao0.9.4codexnot installed (spawn codex ENOENT)Repro
codexonPATH, open a PR from a worker session.ao review run <session> --executeao review list <project>→… failed … 0 open findings …terminationReason: "Codex review failed: spawn codex ENOENT".Suggestions
codexbefore starting and exit with a clear, actionable message (and a non-zero CLI exit).failed + 0 findings; consider a distincterrored/reviewer_unavailablestatus so automation doesn't confuse it with a clean review.reviewer.command(ordefaults.reviewerCommand) inconfig.yamlso a custom reviewer can be used without passing--commandon every run.--commandstdout contract ({"findings":[{severity,title,body,filePath,startLine,endLine,confidence}]};{"findings":[]}= clean) in the help text, since it's currently only discoverable from source.