| name | codex-review |
| description | Run Codex and Claude code reviews iteratively until both find no issues. Use after making changes and before committing. |
| disable-model-invocation | true |
Codex Review
Iterative dual-review pipeline using both OpenAI Codex and Claude. Runs reviews, fixes issues, and repeats until both reviewers are satisfied.
Usage
/codex_review
Behavior
1. Run Codex Review
codex review --uncommitted 2>&1
Capture the full output. Parse it for:
- Specific file and line references
- Issue severity (bugs, style, security, performance)
- Actionable suggestions vs informational comments
2. Run Claude Self-Review
Review the same uncommitted changes yourself:
git diff
git diff --cached
Check for:
- Logic errors and bugs in the changed code
- Security issues (injection, exposed secrets, missing validation)
- Consistency with existing code patterns (read surrounding code if needed)
- Missing error handling at system boundaries
- Test coverage gaps for new/changed functionality
3. Consolidate Issues
Merge findings from both reviews. Deduplicate — if Codex and Claude flag the same issue, count it once. Categorize:
- Must fix: Bugs, security issues, logic errors
- Should fix: Style violations, missing edge cases, unclear code
- Informational: Suggestions, minor nits, opinions
4. Fix Must-Fix and Should-Fix Issues
For each actionable issue:
- Read the file and understand the context
- Apply the fix
- Keep fixes minimal — only address the flagged issue
Do NOT fix informational/nit issues unless trivially adjacent to a real fix.
5. Re-Run Both Reviews
After fixing, run both reviewers again:
codex review --uncommitted 2>&1
And repeat your own Claude review of the current diff.
6. Iterate
If new issues are found:
- Fix them and re-run (back to step 5)
- Keep iterating until both reviewers are clean
- If you're unsure how to fix an issue or uncertain about the intended behavior, ask the user before guessing
If both reviews come back clean: proceed to summary.
7. Summary
## Codex Review Results
### Iteration 1
**Codex found:** 3 issues (1 bug, 2 style)
**Claude found:** 2 issues (1 logic error, 1 missing null check)
**Deduplicated total:** 4 issues
**Fixed:** 4/4
### Iteration 2
**Codex found:** 0 issues
**Claude found:** 0 issues
### Status: CLEAN ✓
### Fixes Applied
1. `src/api/tournaments.ts:45` — Added null check for optional `season` field (bug)
2. `src/components/Bracket.tsx:112` — Fixed off-by-one in round calculation (logic error)
3. `src/utils/scoring.ts:30` — Consistent naming: `calcScore` → `calculateScore` (style)
4. `src/api/tournaments.ts:78` — Added input validation on `status` parameter (missing check)
### Remaining (informational only)
- Codex suggested extracting lines 45-60 into a helper — skipped (one-time operation)
Ready to commit. Run `/safe-commit` when ready.
Important Rules
- Keep iterating until both reviewers are clean. If stuck on an issue, ask the user.
- Fix source code, not symptoms. If Codex flags a symptom, trace to the root cause.
- Don't fix nits in a loop. Informational items are reported but not acted on — they don't trigger another iteration.
- Both reviewers must be clean to declare success. One clean + one with issues = keep iterating.
- Don't argue with Codex. If it flags something legitimate, fix it. If it flags something wrong, note it in the summary as a false positive and move on.
- Never suppress warnings by adding ignore comments (e.g.,
// eslint-disable, @ts-ignore) unless the user explicitly asked.