Adversarial-Review vs Review Command in OpenAI Codex: What's the Difference?

The adversarial-review command is a steerable variant of the standard review command that challenges design decisions and assumptions rather than just flagging bugs and style issues.

Both commands in the openai/codex-plugin-cc repository invoke Codex CLI to perform read‑only code analysis, but they serve fundamentally different purposes in a developer's workflow. Understanding when to use each can significantly improve your code quality checks.

Purpose and Framing: Classic Feedback vs. Critical Challenge

The core distinction lies in what each command asks Codex to do.

Regular review produces a conventional code review. It scans for defects, style inconsistencies, potential bugs, and straightforward improvements. Think of it as a thorough peer reviewer who points out what needs fixing.

adversarial-review conducts a "challenge" review. It questions the design choices, underlying assumptions, trade‑offs, and risk areas in your implementation. This command pressure‑tests your architectural decisions rather than just surface‑level correctness.

This difference is encoded directly in the command definitions. According to the source code:

Steerability: Fixed vs. Customizable Focus

The most practical difference for daily use is steerability—whether you can direct the reviewer's attention to specific concerns.

Capability review adversarial-review
Accepts free‑form focus text No Yes
Custom steering after flags Not supported Supported

With adversarial-review, you append focus text after the command flags to narrow the review scope:


# Direct the adversarial reviewer toward caching safety

codex adversarial-review --base main \
    "challenge whether this caching strategy is safe"

# Focus on race condition risks

codex adversarial-review --background \
    "look for race conditions and question the chosen approach"

The regular review command ignores any trailing text and follows its fixed prompt only.

Scope and Target Selection

Both commands share identical target‑selection logic for specifying what code to analyze:

  • Working‑tree changes (default)
  • --base <ref> for comparing against a branch (e.g., main)
  • --wait to run in foreground and block for results
  • --background to run detached and notify when complete

However, adversarial-review has restricted scope options. It does not support:

  • --scope staged
  • --scope unstaged

These granular staging scopes are exclusive to the regular review command.

Implementation: Where the Commands Live

The behavioral differences are hardcoded in separate markdown command definitions that the runtime companion script consumes:

File Purpose
plugins/codex/commands/review.md Defines the regular review command, arguments, prompt framing, and execution flow
plugins/codex/commands/adversarial-review.md Defines the steerable adversarial review with focus text handling and challenge‑oriented prompt structure
plugins/codex/scripts/codex-companion.mjs The runtime script that invokes Codex CLI for both commands

Both command definitions specify how arguments are parsed, what prompt template to use, and how results are presented. The companion script unifies their execution but respects their distinct configurations.

When to Use Which Command

Use review when you need:

  • Quick sanity checks of uncommitted changes
  • Standard pre‑commit validation
  • Style and bug detection without deep architectural critique

Use adversarial‑review when you need:

  • Pre‑shipping validation that challenges design decisions
  • Focused inspection of high‑risk areas (authentication, concurrency, reliability)
  • External pressure‑testing of trade‑offs you've made

Code Examples

Regular Review Commands


# Background review of working tree changes

codex review --background

# Compare current branch against main

codex review --base main

# Foreground review with blocking wait

codex review --wait

# Review only staged files

codex review --scope staged

Adversarial Review Commands


# Basic adversarial challenge (foreground)

codex adversarial-review

# Challenge a specific design choice on a feature branch

codex adversarial-review --base feature/auth-redesign \
    "question whether the token refresh flow introduces session hijacking risks"

# Background adversarial review with concurrency focus

codex adversarial-review --background \
    "challenge the thread-safety of this shared state management"

Summary

  • review provides conventional, non‑steerable code analysis ideal for routine quality checks
  • adversarial‑review offers steerable, challenge‑oriented analysis that interrogates design decisions
  • Both share base selection (--base, --wait, --background) but differ in scope granularity and prompt framing
  • Implementation resides in plugins/codex/commands/review.md and plugins/codex/commands/adversarial-review.md, executed via plugins/codex/scripts/codex-companion.mjs

Frequently Asked Questions

Can I use adversarial‑review to check only staged changes?

No. The adversarial-review command does not support --scope staged or --scope unstaged. These granular scope options are exclusive to the regular review command. If you need adversarial analysis of staged changes, you must temporarily commit or use --base to target your previous commit.

Does adversarial‑review find more bugs than regular review?

Not necessarily. adversarial-review is optimized for design critique and risk identification rather than bug count. It may surface fewer "line‑level" issues while generating deeper architectural concerns. For comprehensive coverage, consider running both commands—review for correctness, adversarial-review for robustness.

How do I steer an adversarial review toward specific files?

You cannot directly target individual files via flags. Instead, use the free‑form focus text after your flags to describe the area of concern: codex adversarial-review "focus on the payment processing module in src/payments/". The prompt framework directs Codex's attention accordingly.

Are both commands safe to run on proprietary code?

Yes. Both review and adversarial‑review are read‑only operations. According to the source implementation in openai/codex-plugin-cc, neither command modifies your working tree, staging area, or repository state. They invoke Codex CLI for analysis only.

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:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →