Skip to content

review run fails silently as failed / 0 findings when codex isn't installed (spawn codex ENOENT) #2092

@vikt0r0

Description

@vikt0r0

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:

  1. 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").
  2. 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.
  3. 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

  1. On a host without codex on PATH, open a PR from a worker session.
  2. ao review run <session> --execute
  3. ao review list <project>… failed … 0 open findings …
  4. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions