# Adversarial Review vs Regular Review in Codex: Key Differences Explained

> Understand the key differences between adversarial review and regular review in OpenAI Codex. Learn how adversarial review questions assumptions while regular review checks for bugs and style.

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

---

**Adversarial review is a steerable, skeptical inspection that questions implementation choices and hidden assumptions, while regular review provides a standard read-only check for bugs and style issues.**

The **openai/codex-plugin-cc** repository provides two distinct code review modes within the Codex CLI ecosystem. Understanding the difference between adversarial review and regular review in Codex helps developers choose the appropriate inspection depth for everything from quick sanity checks to safety-critical design validations.

## Command Definitions and Purpose

### Standard Review (`/codex:review`)

Defined in [`plugins/codex/commands/review.md`](https://github.com/openai/codex-plugin-cc/blob/main/plugins/codex/commands/review.md), the standard review command provides a **read-only** analysis that checks for bugs, style issues, and basic correctness. It uses the generic Codex reviewer prompt and executes fully automatically without accepting additional user guidance.

### Adversarial Review (`/codex:adversarial-review`)

Defined in [`plugins/codex/commands/adversarial-review.md`](https://github.com/openai/codex-plugin-cc/blob/main/plugins/codex/commands/adversarial-review.md), this command provides a **steerable, adversarial** inspection that explicitly frames Codex as a skeptic. According to the source code, it is designed to "break confidence" rather than validate changes, actively questioning design trade-offs and probing for hidden failure modes.

## Key Architectural Differences

| Aspect | Standard Review | Adversarial Review |
|--------|----------------|-------------------|
| **Prompt** | Generic reviewer prompt | Dedicated adversarial prompt from [`plugins/codex/prompts/adversarial-review.md`](https://github.com/openai/codex-plugin-cc/blob/main/plugins/codex/prompts/adversarial-review.md) |
| **Steerability** | No extra focus text allowed | Accepts **focus text** after flags to highlight specific risk areas |
| **Output Format** | Raw review output verbatim | **Structured JSON report** emphasizing failure scenarios and mitigations |
| **Model Invocation** | Standard execution | `disable-model-invocation: true` in command metadata |

## The Adversarial Prompt Structure

The adversarial review leverages a specialized prompt file that drives Codex to adopt a skeptical stance. As implemented in [`plugins/codex/prompts/adversarial-review.md`](https://github.com/openai/codex-plugin-cc/blob/main/plugins/codex/prompts/adversarial-review.md), the prompt includes specific XML-style sections:

- **`<operating_stance>`**: Frames Codex as an active skeptic that challenges assumptions
- **`<attack_surface>`**: Identifies specific areas to pressure-test
- **`<review_method>`**: Defines the skeptical approach to code examination
- **`<structured_output_contract>`**: Enforces JSON output emphasizing failure modes and concrete mitigations

## Practical Usage Examples

Both commands invoke the same underlying companion script (`codex-companion.mjs`), but load different prompts based on the sub-command specified.

### Running a Standard Review

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

# Background execution

/codex:review --background

```

This returns a conventional review of changes between `main` and the current HEAD.

### Running an Adversarial Review

```bash
/codex:adversarial-review

# With specific focus on risk areas

/codex:adversarial-review --base main challenge whether this caching design is safe

# Background with focus

/codex:adversarial-review --background look for race conditions and question the approach

```

The focus text ("challenge whether this caching design is safe") directs the model to examine specific vulnerabilities within the configured attack surface.

### Programmatic Invocation

```javascript
const { execSync } = require('child_process');
const companion = `${process.env.CLAUDE_PLUGIN_ROOT}/scripts/codex-companion.mjs`;

// Standard review
execSync(`node "${companion}" review --base main`, { stdio: 'inherit' });

// Adversarial review with focus text
execSync(`node "${companion}" adversarial-review --base main "challenge error-handling assumptions"`, { stdio: 'inherit' });

```

## Summary

- **Standard review** (`/codex:review`) provides automated, read-only checks for bugs and style issues using the generic prompt defined in [`plugins/codex/commands/review.md`](https://github.com/openai/codex-plugin-cc/blob/main/plugins/codex/commands/review.md).
- **Adversarial review** (`/codex:adversarial-review`) uses a specialized skeptical prompt to challenge implementation choices and uncover hidden failure modes.
- The adversarial mode accepts **focus text** to steer inspection toward specific risk areas, outputting a structured JSON report rather than raw text.
- Both commands execute through `plugins/codex/scripts/codex-companion.mjs`, differing only in which prompt file they load from the `plugins/codex/prompts/` directory.

## Frequently Asked Questions

### Can adversarial review automatically fix the code issues it finds?

No. Both standard and adversarial review modes are **read-only** operations that never apply patches. The adversarial review explicitly frames the inspection to question implementation choices rather than validate them, but it will not modify source files according to the command definitions in the repository.

### How do I steer an adversarial review toward specific concerns?

Append your focus text after the command flags. For example: `/codex:adversarial-review --base main look for memory leaks in the connection pool`. This focus text is passed to the adversarial prompt, which directs Codex to prioritize examining that specific attack surface as defined in the `<attack_surface>` section.

### What is the difference between the output formats?

Standard review returns Codex's raw review output verbatim. Adversarial review returns a **structured JSON report** defined by the `<structured_output_contract>` section in [`plugins/codex/prompts/adversarial-review.md`](https://github.com/openai/codex-plugin-cc/blob/main/plugins/codex/prompts/adversarial-review.md), emphasizing failure scenarios, hidden assumptions, and concrete mitigations.

### Do both commands use the same underlying review engine?

Yes. According to the `openai/codex-plugin-cc` source code, both commands invoke `codex-companion.mjs` with different sub-commands (`review` vs `adversarial-review`). The engine loads the appropriate prompt from the `plugins/codex/prompts/` directory, ensuring the same Codex binary handles both modes while changing the nature of the feedback through prompt engineering.