# /codex:review vs /codex:adversarial-review: What's the Difference in OpenAI's Codex Plugin

> Discover the difference between OpenAI Codex commands /codex:review and /codex:adversarial-review. Understand their unique approaches to code review and defect detection.

- Repository: [OpenAI/codex-plugin-cc](https://github.com/openai/codex-plugin-cc)
- Tags: deep-dive
- Published: 2026-08-01

---

**Both commands run read-only Codex code reviews through the same plugin runtime, but `/codex:adversarial-review` explicitly challenges design decisions and trade-offs while `/codex:review` provides neutral defect detection.**

The `openai/codex-plugin-cc` repository provides two slash commands for automated code review. Understanding when to use each helps developers get the right type of feedback—whether they need straightforward bug detection or aggressive scrutiny of architectural choices.

## Core Purpose and Framing

The fundamental difference lies in how the model approaches your code.

**`/codex:review`** performs a neutral, standard inspection. It checks for implementation defects, style inconsistencies, and obvious bugs without预设 assumptions about your approach.

**`/codex:adversarial-review`** explicitly frames the review as a challenge. According to the prompt template in [`plugins/codex/prompts/adversarial-review.md`](https://github.com/openai/codex-plugin-cc/blob/main/plugins/codex/prompts/adversarial-review.md), this mode encourages the model to surface design-level concerns, question trade-offs, and probe hidden assumptions that a neutral review might overlook.

Both commands share identical execution mechanics: they use the same diff-selection logic (working-tree, branch diff, or explicit `--base`), the same foreground/background execution modes, and the same prohibition against auto-fixing or patching code. See [`plugins/codex/commands/review.md`](https://github.com/openai/codex-plugin-cc/blob/main/plugins/codex/commands/review.md) and [`plugins/codex/commands/adversarial-review.md`](https://github.com/openai/codex-plugin-cc/blob/main/plugins/codex/commands/adversarial-review.md) for the command definitions.

## Command Syntax and Unique Features

### Standard Review Command

The `/codex:review` command accepts these flags:

```bash
/codex:review --wait                    # Foreground execution

/codex:review --background              # Force background task

/codex:review --base <ref>              # Compare against specific branch/commit

/codex:review --scope auto|working-tree|branch   # Control diff selection

```

**Critical limitation:** This command does **not** accept free-form focus arguments. The review scope is determined entirely by flags and automatic diff detection.

### Adversarial Review Command

The `/codex:adversarial-review` command supports the same flags **plus** optional trailing focus text:

```bash
/codex:adversarial-review --wait --base main
/codex:adversarial-review --scope branch --base develop performance security

```

In the second example, `performance security` becomes the *focus* argument passed to `codex-companion.mjs`. This directs the adversarial review to scrutinize those specific aspects, as documented in [`plugins/codex/commands/adversarial-review.md`](https://github.com/openai/codex-plugin-cc/blob/main/plugins/codex/commands/adversarial-review.md).

## Runtime Execution: How Both Commands Work

Both commands invoke the same shared runtime script at `plugins/codex/scripts/codex-companion.mjs`. The difference is the subcommand passed:

| Command | Companion Script Invocation |
|---------|----------------------------|
| `/codex:review` | `node …/codex-companion.mjs review "$ARGUMENTS"` |
| `/codex:adversarial-review` | `node …/codex-companion.mjs adversarial-review "$ARGUMENTS"` |

The execution flow is identical for both:

1. **Size estimation:** If no `--wait` or `--background` flag is provided, the plugin estimates diff size
2. **User prompt:** Presents "Wait for results" and "Run in background" options, marking one as `(Recommended)` based on estimated workload
3. **Review execution:** Launches the appropriate Codex review with command-specific prompt templates

## Practical Usage Examples

### Standard Review Workflows

Run a normal review immediately in the foreground:

```bash
/codex:review --wait

```

Let the plugin decide execution mode based on diff size:

```bash
/codex:review

```

Review changes against a specific base branch:

```bash
/codex:review --base main --scope branch

```

### Adversarial Review Workflows

Challenge design decisions with immediate feedback:

```bash
/codex:adversarial-review --wait --base main

```

Focus the challenge on specific concerns:

```bash
/codex:adversarial-review --scope working-tree memory-usage thread-safety

```

Run adversarial review against branch diff with custom focus:

```bash
/codex:adversarial-review --scope branch --base develop api-consistency error-handling

```

## Key Source Files

| Path | Purpose |
|------|---------|
| [`plugins/codex/commands/review.md`](https://github.com/openai/codex-plugin-cc/blob/main/plugins/codex/commands/review.md) | Standard review command definition and flag handling |
| [`plugins/codex/commands/adversarial-review.md`](https://github.com/openai/codex-plugin-cc/blob/main/plugins/codex/commands/adversarial-review.md) | Adversarial review command with focus argument parsing |
| `plugins/codex/scripts/codex-companion.mjs` | Shared runtime entry point for both commands |
| [`plugins/codex/prompts/adversarial-review.md`](https://github.com/openai/codex-plugin-cc/blob/main/plugins/codex/prompts/adversarial-review.md) | Prompt template shaping the challenge-oriented tone |
| [`plugins/codex/prompts/stop-review-gate.md`](https://github.com/openai/codex-plugin-cc/blob/main/plugins/codex/prompts/stop-review-gate.md) | Prompt template for neutral standard reviews |

## Summary

- **Use `/codex:review`** for straightforward defect detection, style checks, and bug identification
- **Use `/codex:adversarial-review`** when you want aggressive scrutiny of design decisions, trade-offs, and assumptions
- **Add focus text** to adversarial reviews to direct attention at specific concerns like performance, security, or API design
- Both commands share the same execution infrastructure in `codex-companion.mjs` and differ only in framing prompt and argument handling
- Neither command modifies code—both are strictly read-only review operations

## Frequently Asked Questions

### Can I add focus text to a standard `/codex:review` command?

No. The standard review command in [`plugins/codex/commands/review.md`](https://github.com/openai/codex-plugin-cc/blob/main/plugins/codex/commands/review.md) does not parse trailing free-form arguments. Only `/codex:adversarial-review` supports the optional `focus …` parameter to direct review attention. Use adversarial review if you need targeted examination of specific aspects.

### Do both commands support background execution?

Yes. Both commands implement identical execution-mode logic. Without `--wait` or `--background` flags, the plugin estimates diff size and recommends either foreground or background execution, marking the suggested option as `(Recommended)`. Use `--wait` to force immediate results or `--background` to always run as a Claude task.

### What happens under the hood when I run these commands?

Both commands invoke `plugins/codex/scripts/codex-companion.mjs` with their respective subcommand (`review` or `adversarial-review`). The companion script handles Codex API interaction, while command-specific prompt templates—[`stop-review-gate.md`](https://github.com/openai/codex-plugin-cc/blob/main/stop-review-gate.md) for standard reviews and [`adversarial-review.md`](https://github.com/openai/codex-plugin-cc/blob/main/adversarial-review.md) for adversarial ones—shape the model's output tone and framing.

### When should I choose adversarial review over standard review?

Choose adversarial review when you need design-level critique rather than implementation-level bug detection. The adversarial framing in [`plugins/codex/prompts/adversarial-review.md`](https://github.com/openai/codex-plugin-cc/blob/main/plugins/codex/prompts/adversarial-review.md) explicitly instructs the model to challenge your approach, surface unstated assumptions, and evaluate trade-offs. Add focus arguments to concentrate this scrutiny on specific concerns like security boundaries, scalability, or maintainability.