# Difference Between Adversarial-Review and Regular Review in the Codex Plugin

> Understand the difference between regular review and adversarial review in the Codex plugin. Discover how adversarial review aggressively tests your code for risks.

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

---

**Regular review (`/codex:review`) provides a neutral, read-only code quality assessment, while adversarial review (`/codex:adversarial-review`) launches a steerable, aggressive examination that attempts to break confidence in the implementation by exposing design-level risks and hidden failure modes.**

The `openai/codex-plugin-cc` repository provides two distinct code review commands that serve different validation purposes. While both leverage the Codex model to analyze repository changes, they differ fundamentally in their prompting strategy, output contracts, and intended use cases. Understanding the **difference between adversarial-review and regular review in the Codex plugin** helps developers choose the appropriate validation level for their code changes.

## Core Architectural Differences

### Command Goals and Intent

Regular review aims for **neutral validation**. It scans for bugs, style issues, and incremental improvements without challenging the underlying design assumptions. In contrast, adversarial review takes an opposing stance—it actively attempts to "break confidence" in the change by hunting for high-cost failure surfaces such as authentication flaws, data loss scenarios, and race conditions.

### Prompt Contracts and System Instructions

The commands load different prompt templates from the `plugins/codex/prompts/` directory. Regular review uses the standard review prompt defined in [`plugins/codex/commands/review.md`](https://github.com/openai/codex-plugin-cc/blob/main/plugins/codex/commands/review.md), which provides generic instructions for code analysis. Adversarial review loads [`plugins/codex/prompts/adversarial-review.md`](https://github.com/openai/codex-plugin-cc/blob/main/plugins/codex/prompts/adversarial-review.md), which explicitly instructs Codex to adopt an adversarial operating stance and prioritize attack-surface analysis over stylistic concerns.

### User Steerability and Focus Text

This is where the functional divergence becomes most apparent. Regular review does **not** accept custom focus text; it evaluates only the repository diff selected by the target-selection logic. Adversarial review accepts **free-form focus text** after command flags, allowing users to direct the model toward specific design decisions. This text is interpolated into the prompt via the `{{USER_FOCUS}}` variable, making the review fully steerable.

### Output Schema and Finding Bar

Regular review returns a standard structured JSON defined in [`review-output.schema.json`](https://github.com/openai/codex-plugin-cc/blob/main/review-output.schema.json), potentially including style suggestions and low-impact findings. Adversarial review returns a **stricter JSON contract** that filters out stylistic feedback through a `<finding_bar>` mechanism. It only reports material, adversarial findings and requires a **`needs-attention`** flag for any substantive risk. If no critical issues are found, it returns an **`approve`** status.

## Practical Usage Examples

Run a regular review for routine code quality checks:

```bash
/codex:review --background

```

Launch an adversarial review challenging a specific caching strategy:

```bash
/codex:adversarial-review --base main \
    challenge whether the chosen caching strategy handles network partitions

```

Use adversarial review to hunt for race conditions specifically:

```bash
/codex:adversarial-review --background look for race conditions

```

## Implementation Details in the Source Code

Both commands route through the same entry point in `plugins/codex/scripts/codex-companion.mjs`. At line 534, the runtime distinguishes between the two modes using a `kind` parameter:

- **Regular review**: `kind === "review"`
- **Adversarial review**: `kind === "adversarial-review"` (lines 534-562)

The job-control logic in `scripts/lib/job-control.mjs` stores this metadata, enabling the UI to display appropriate labels and apply the correct prompt template. The adversarial command defined in [`plugins/codex/commands/adversarial-review.md`](https://github.com/openai/codex-plugin-cc/blob/main/plugins/codex/commands/adversarial-review.md) specifically references the adversarial prompt template, while the regular command in [`plugins/codex/commands/review.md`](https://github.com/openai/codex-plugin-cc/blob/main/plugins/codex/commands/review.md) uses the standard template.

## Summary

- **Regular review** (`/codex:review`) provides neutral, read-only validation suitable for quick sanity checks and routine code quality passes.
- **Adversarial review** (`/codex:adversarial-review`) offers steerable, aggressive risk hunting that challenges design assumptions and exposes high-cost failure modes.
- **Key differentiator**: Adversarial review accepts custom focus text via `{{USER_FOCUS}}` interpolation, while regular review uses a fixed prompt.
- **Output distinction**: Adversarial review uses a stricter JSON contract with `needs-attention` flags, filtering out stylistic feedback that regular review includes.
- **Source files**: The distinction is implemented in `codex-companion.mjs` (line 534) and tracked in `job-control.mjs` via the `kind` parameter.

## Frequently Asked Questions

### Can I use adversarial review for every code change?

While technically possible, adversarial review is computationally more intensive and produces focused output on high-risk issues. Reserve it for significant architectural changes, security-sensitive code, or when you need to validate assumptions. Use regular review for routine incremental updates and style checks.

### How does the focus text parameter work in adversarial review?

After specifying standard flags like `--base` or `--background`, you can append free-form text that Codex uses to steer the analysis. This text replaces the `{{USER_FOCUS}}` placeholder in [`plugins/codex/prompts/adversarial-review.md`](https://github.com/openai/codex-plugin-cc/blob/main/plugins/codex/prompts/adversarial-review.md), allowing you to direct the model toward specific concerns like "check for SQL injection vectors" or "verify thread safety."

### What happens if adversarial review finds no material issues?

According to the output contract defined in the source code, when no substantive risks are identified, the adversarial review returns an `approve` status rather than an empty finding list. This differs from regular review, which may return various low-priority suggestions even when no critical bugs exist.

### Are the command-line flags identical between the two review types?

Both commands support `--base <ref>`, `--wait`, and `--background` flags. However, adversarial review uniquely accepts trailing focus text after these flags, while regular review ignores any additional text beyond the flags.