Difference Between `/codex:review` and `/codex:adversarial-review` in OpenAI's Codex Plugin
/codex:review performs a neutral code review for bugs and style issues, while /codex:adversarial-review actively challenges design decisions and accepts optional focus arguments to target specific concerns like performance or security.
The openai/codex-plugin-cc repository provides two distinct slash commands that analyze code through the same shared plugin runtime. Both commands are read-only operations that return verbatim output without patching files, but they differ fundamentally in their analytical approach and input parameters.
Core Differences in Purpose and Framing
Standard Review vs. Adversarial Challenge
/codex:review executes a straightforward code review that checks for implementation defects, style violations, and obvious bugs. It operates with a neutral tone defined in plugins/codex/prompts/stop-review-gate.md, focusing primarily on correctness and code quality.
/codex:adversarial-review takes an explicitly confrontational stance. According to the command definition in plugins/codex/commands/adversarial-review.md, this mode actively challenges the overall design, implementation approach, trade-offs, and underlying assumptions. The prompt template in plugins/codex/prompts/adversarial-review.md frames the review as a "challenge" to the current approach, encouraging the model to surface design-level concerns that a standard review might overlook.
Focus Arguments
Only the adversarial review command accepts optional free-form focus arguments. You can append specific keywords after the flags to direct scrutiny toward particular aspects:
/codex adversarial-review --scope branch --base develop performance security
In this example, performance and security become the focus argument, instructing the model to prioritize those concerns. The standard review command does not accept extra free-form text beyond its defined flags.
Shared Execution Infrastructure
Despite their different approaches, both commands share identical core mechanics:
- Target Selection: Both support
--base <ref>to specify a comparison branch and--scope auto|working-tree|branchto define the review target. - Execution Modes: Both support
--waitfor foreground execution and--backgroundfor asynchronous processing. - Size Estimation: Both follow the same "size-estimate → ask user" flow. If no execution flag is provided, the plugin estimates the diff size and recommends either immediate execution or background processing with the recommended option marked
(Recommended).
Implementation Details
Both commands invoke the same runtime script located at plugins/codex/scripts/codex-companion.mjs, but pass different subcommand arguments:
- Standard review: Calls
node …/codex-companion.mjs review "$ARGUMENTS" - Adversarial review: Calls
node …/codex-companion.mjs adversarial-review "$ARGUMENTS"
The command definitions reside in plugins/codex/commands/review.md and plugins/codex/commands/adversarial-review.md respectively, while their distinct behaviors are shaped by separate prompt templates in the plugins/codex/prompts/ directory.
Practical Usage Examples
Run a standard review immediately in the foreground:
/codex review --wait
Execute an adversarial review against the main branch with specific focus areas:
/codex adversarial-review --wait --base main scalability error-handling
Launch either review in the background (let the plugin estimate and recommend):
/codex review
/codex adversarial-review --scope working-tree
Summary
- Both commands are review-only operations that analyze code without applying fixes or patches.
- Standard review (
/codex:review) focuses on implementation defects and style issues with neutral framing. - Adversarial review (
/codex:adversarial-review) challenges design decisions and accepts optional focus arguments to target specific concerns. - Both commands share the same flag set (
--wait,--background,--base,--scope) and execution flow throughcodex-companion.mjs. - Command definitions are located in
plugins/codex/commands/, while prompt templates reside inplugins/codex/prompts/.
Frequently Asked Questions
Can I use focus arguments with /codex:review?
No. Only /codex:adversarial-review accepts free-form focus text after the flags. The standard review command strictly uses the defined flag parameters and ignores additional trailing arguments.
Do these commands modify my code?
No. Both commands are strictly read-only. They return verbatim analysis output without patching, fixing, or otherwise modifying your working tree or branch. According to the source implementation, they are constrained to output-only operations.
Which prompt template does each command use?
The standard review command uses plugins/codex/prompts/stop-review-gate.md, while the adversarial review command uses plugins/codex/prompts/adversarial-review.md. These templates establish the distinct tones—neutral versus challenging—that differentiate the two review modes.
How do I run a review against a specific branch?
Use the --base flag with either command. For example: /codex review --base main --wait or /codex adversarial-review --base develop --scope branch. Both commands support the same target selection flags defined in their respective command definitions.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →