feat(review): add codex-reviewer agent for cross-model validation#352
feat(review): add codex-reviewer agent for cross-model validation#352mvanhorn wants to merge 1 commit intoEveryInc:mainfrom
Conversation
Add a review agent that delegates to OpenAI's Codex CLI (`codex review`) to provide cross-model code review validation. The agent: - Guards against running inside Codex sandbox (CODEX_SANDBOX/CODEX_SESSION_ID) - Detects codex CLI availability and skips gracefully if not installed - Resolves the base branch from PR context or git remote HEAD - Runs `codex review --base $BRANCH` using the user's configured model - Formats output for the ce:review synthesis pipeline - Opt-in via compound-engineering.local.md review_agents list Does not hardcode a model - delegates to codex's own config. Partially addresses EveryInc#34 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ca49e8c8ed
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| ```bash | ||
| git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@' | ||
| ``` | ||
| 3. Fall back to `main` |
There was a problem hiding this comment.
Handle master repos in base-branch fallback
The final fallback hardcodes main, which breaks this reviewer in repositories that still default to master (a case the plugin supports elsewhere) when refs/remotes/origin/HEAD is missing. In that scenario BASE_BRANCH becomes a non-existent ref, so codex review --base "$BASE_BRANCH" fails and the agent always returns FAILED instead of producing review output. Add a master fallback (or detect an existing default branch) before defaulting.
Useful? React with 👍 / 👎.
|
Checked out #348 - the structured pipeline with confidence calibration is a much better home for a cross-model reviewer than the old free-form dispatch. Makes sense to build on that. I'll close this and open a new PR against the review-beta branch that adds the codex-reviewer as a pipeline stage. Should slot in cleanly as stage 5 or 6 since it's doing independent validation. |
1 similar comment
|
Checked out #348 - the structured pipeline with confidence calibration is a much better home for a cross-model reviewer than the old free-form dispatch. Makes sense to build on that. I'll close this and open a new PR against the review-beta branch that adds the codex-reviewer as a pipeline stage. Should slot in cleanly as stage 5 or 6 since it's doing independent validation. |
Adds a codex-reviewer persona agent that delegates to the Codex CLI for cross-model validation, then translates findings into the structured JSON schema used by the review-beta pipeline. Gracefully degrades when codex is unavailable. - New agent: agents/review/codex-reviewer.md - Added to persona-catalog.md as conditional cross-model reviewer - Added to SKILL.md conditional reviewers table - Updated persona count from 8 to 9 Addresses feedback from EveryInc#352. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds a codex-reviewer persona agent that delegates to the Codex CLI for cross-model validation, then translates findings into the structured JSON schema used by the review-beta pipeline. Gracefully degrades when codex is unavailable. - New agent: agents/review/codex-reviewer.md - Added to persona-catalog.md as conditional cross-model reviewer - Added to SKILL.md conditional reviewers table - Updated persona count from 8 to 9 Addresses feedback from EveryInc#352. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
Adds a review agent that delegates to
codex reviewfor an independent second opinion duringce:review. Users opt in by addingcodex-reviewerto theirreview_agentslist incompound-engineering.local.md.Why
Users are manually running
codex reviewin separate terminals and merging the results themselves. @JamesHenry in #34: "I've found myself frequently manually invoking codex to check work. Having it native to this plugin flow would be great."PR #328 added Codex delegation for code writing via
ce:work-beta. This extends the pattern to the review side.Changes
One new file:
plugins/compound-engineering/agents/review/codex-reviewer.md(81 lines)The agent:
CODEX_SANDBOX/CODEX_SESSION_IDenv vars)codex review --base $BRANCHusing the user's own configured model (no hardcoded model - respects~/.codex/config.toml)Also adds the agent to the README review agents table.
Design notes
Follows @tmchow's feedback from #328:
-mflag omitted, uses codex default)review_agentsconfig, not forced on all usersUses
codex review(the purpose-built review subcommand) rather thancodex execwith piped diffs as proposed in #34. The dedicated subcommand handles diff extraction, file context, and structured output internally.Testing
bun run release:validatepasses (30 agents, 42 skills, 1 MCP server)codex review --base mainon this branch's diff - it read the changes, inspected surrounding agent files, and produced a structured reviewCODEX_SANDBOXandCODEX_SESSION_IDare unset in Claude Code, set inside Codex sandboxPartially addresses #34
This contribution was developed with AI assistance (Claude Code).