Native Review vs Adversarial Review in the Codex Plugin: Key Differences Explained

Native review provides a neutral, quality-focused code analysis, while adversarial review adopts a skeptical stance to challenge assumptions and surface hidden failure modes through steerable focus text.

The openai/codex-plugin-cc repository ships two distinct review commands that leverage the same underlying Codex engine but differ fundamentally in intent, prompt engineering, and flexibility. Understanding the difference between native review and adversarial review helps developers choose the right scrutiny level for their code changes, from routine quality checks to aggressive stress-testing of design decisions.

Command Structure and Execution Flow

Both review commands ultimately invoke the same companion script at plugins/codex/scripts/codex-companion.mjs. The script receives raw arguments and handles target selection (git status, diffs, and optional --base references) identically for both modes.

The architectural divergence occurs at the sub-command level:

This sub-command distinction determines which prompt template loads into the context window, while the file selection logic remains shared.

Prompt Engineering and Model Framing

The critical difference lies in the system prompt that frames the model's reasoning.

Native review uses a built-in "review" prompt that remains neutral and factual. It focuses on correctness, style issues, and general code quality without applying stress-testing logic.

Adversarial review loads plugins/codex/prompts/adversarial-review.md, which contains explicit sections such as <operating_stance>, <attack_surface>, <review_method>, and <finding_bar>. These sections force the model to adopt a skeptical stance, asking "what could go wrong?" and refusing to give credit for good intent unless rigorously defended. The prompt explicitly frames the task as breaking confidence in the change rather than validating it.

Steerability and Command Options

The commands diverge significantly in user control.

Native review (/codex:review) accepts standard flags (--wait, --background, --base <ref>) but does not accept custom focus text. The review scope remains fixed by the underlying prompt template.

Adversarial review (/codex:adversarial-review) supports the same flags plus an optional free-form focus string after the flags. This steerability allows callers to direct the challenge toward specific risk areas, such as questioning caching consistency or probing race conditions in concurrent code.


# Native review - fixed scope, no focus text

/codex:review --background
/codex:review --base main --wait

# Adversarial review - steerable with focus text

/codex:adversarial-review "challenge whether the retry logic handles network partitions"
/codex:adversarial-review --base main "question the caching strategy for consistency"
/codex:adversarial-review --background "look for race conditions in the new worker pool"

When to Use Each Review Type

Choose native review when you need a straightforward, read‑only assessment of current changes or branch diffs. It excels at catching bugs, style violations, and general quality issues without consuming excessive context on speculative failure modes.

Choose adversarial review when you need to pressure-test assumptions, explore edge-case failures, or challenge design decisions before shipping. Use it when the cost of missing a subtle flaw exceeds the cost of over-engineering, particularly for distributed systems, security-critical code, or complex state management.

Summary

  • Native review uses a neutral prompt via plugins/codex/commands/review.md and provides fixed-scope quality analysis.
  • Adversarial review uses a skeptical prompt from plugins/codex/prompts/adversarial-review.md with explicit attack-surface framing.
  • Both commands share the same underlying execution engine (codex-companion.mjs) and target-selection logic.
  • Only adversarial review supports steerability through optional focus text for targeting specific risks.
  • Native review accepts --wait, --background, and --base flags; adversarial review accepts these plus custom focus strings.

Frequently Asked Questions

Can I run both review types on the same code change?

Yes. Since both commands use identical file selection logic in codex-companion.mjs, you can run /codex:review for baseline quality checks and immediately follow with /codex:adversarial-review focused on specific risk areas. The operations are independent and do not interfere with each other.

Does adversarial review consume more tokens than native review?

While both commands process the same diff context, adversarial review typically generates longer outputs because the prompt explicitly requires the model to enumerate failure modes, hidden assumptions, and design risks. The <finding_bar> section in plugins/codex/prompts/adversarial-review.md mandates material findings only, which often results in more verbose analysis compared to the neutral native review prompt.

Can I customize the native review prompt to add steerability?

No. According to the source code in plugins/codex/commands/review.md, the native review command does not accept focus text or custom prompt modifications. If you require steerable review behavior, you must use the adversarial review command, which explicitly supports free-form focus strings to direct the model's skepticism toward specific concerns.

What happens if I run adversarial review without focus text?

The command remains functional. When you invoke /codex:adversarial-review without trailing focus text, the model executes the adversarial prompt from plugins/codex/prompts/adversarial-review.md using its default attack-surface sections. The review will still challenge assumptions and surface failure modes, but without the directional constraints that focus text provides.

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 →