---
title: Code Review
description: "Run AI code review with Claude, Codex, and other agents — single or multi-agent passes over a diff, with custom reviewers and configurable workflows."
updated: "2026-10-13"
---

## Overview

Agentastic includes integrated code review powered by AI agents. Review your changes before committing or get suggestions on existing code. Multiple agents can run in parallel, each providing a different perspective.

## Supported Agents

### Claude Code

Anthropic's Claude provides intelligent code review with deep understanding of code patterns and best practices.

**Command:** `claude "$(cat 'prompt_file')"`

**Requirements:**
- Claude Code CLI installed (`npm install -g @anthropic-ai/claude-code`)
- Anthropic API key configured

### Codex

OpenAI's Codex agent for code analysis and suggestions.

**Command:** `codex review "$(cat 'prompt_file')"`

**Requirements:**
- Codex CLI installed
- OpenAI API key configured

### CodeRabbit

CodeRabbit integration for automated PR reviews and code quality checks.

**Command:** `coderabbit review`

**Requirements:**
- CodeRabbit CLI installed
- CodeRabbit account connected

### Greptile

Greptile runs a full review on your local branch diff with whole-codebase context — severity-rated findings, suggested fixes, and a PR summary, identical to its GitHub/GitLab reviews.

**Command:** `greptile review --agent`

**Requirements:**
- Greptile CLI installed (`curl -fsSL https://greptile.com/cli/install | bash`)
- Greptile account connected (`greptile login`)

### Cursor Agent

Cursor's AI agent for code review. Supports sandbox control (`--sandbox enabled|disabled`) and cloud offloading (`--cloud`).

**Command:** `agent --model auto --print "$(cat 'prompt_file')"`

## Using Code Review

### Review Current Changes

1. Click the **Code Review** button in the toolbar
2. Select which agent(s) to use (or use your defaults from Settings)
3. The agent runs in a new terminal tab
4. Review the feedback in the terminal output

### From the Toolbar

- **Click** - Run review with enabled agents from Settings
- **Hold/Menu** - Select specific agent(s) to use

### From Your iPhone

With the [Companion](/docs/features/companion#ask-an-agent-to-review-it) paired, open a worktree on the phone and tap **Review**, or long-press it and choose **Review Changes…**. The sheet offers the same two choices as the toolbar button: **Review Diff** with your enabled reviewers, or one specific reviewer. The review runs on the Mac with the prompt and reviewers configured here, and starts in the background without changing what the Mac's window shows.

### What Gets Reviewed

The **Review Diff** action prompt includes:
- Current branch vs target branch comparison
- Complete unified diff of all changes
- Commit history between branches
- Review criteria prioritization

Customize this prompt in **Settings > Tasks**. The built-in template uses `{currentBranch}`, `{targetBranch}`, `{diff}`, and `{commitHistory}`, but all Actions placeholders are available if you customize it. See the [Actions placeholder reference](/docs/features/actions#placeholder-reference).

### Review Criteria

Agents are prompted to prioritize:
1. **Bugs** - Logic errors, edge cases, null handling
2. **Security** - Vulnerabilities, input validation, secrets
3. **Performance** - Inefficiencies, memory leaks, N+1 queries
4. **Maintainability** - Code clarity, documentation, patterns
5. **Testing** - Test coverage, test quality

## Multi-Agent Reviews

Enable multiple agents to get diverse perspectives:

1. Go to **Settings > Code Review**
2. Enable the agents you want to use
3. Click **Review** - all enabled agents run in parallel
4. Each agent opens in its own terminal tab

Different agents catch different issues:
- Claude excels at understanding intent and architecture
- Codex focuses on code patterns and best practices
- CodeRabbit specializes in PR-specific feedback
- Greptile reviews the branch diff with full-codebase context

## Adding Custom Agents

Add your own review agents to integrate team tools or alternative AI services.

### Configuration

1. Go to **Settings > Code Review**
2. Scroll to **Custom Agents**
3. Click **Add Agent**
4. Enter:
   - **Name**: Display name for the agent
   - **Command**: Shell command to execute

### Command Template

Use `{prompt}` as a placeholder for the review prompt:

```bash
my-agent review --prompt "{prompt}"
```

If `{prompt}` is not in your command, the prompt is passed via a temporary file:

```bash
my-agent "$(cat 'prompt_file')"
```

### Examples

**Local LLM with Ollama:**
```bash
ollama run codellama "$(cat 'prompt_file')"
```

**Custom script:**
```bash
./scripts/review.sh "{prompt}"
```

**Team review tool:**
```bash
team-reviewer --format=terminal "{prompt}"
```

## Configuration

Use **Settings > Tasks** for the primary Review Diff prompt, model, and execution target. Use **Settings > Code Review** to select any additional reviewers that should receive the same captured review prompt.

| Setting | Description |
|---------|-------------|
| Review Diff action | Primary prompt, model, and execution target; configured in Tasks |
| Enabled Agents | Toggle additional built-in reviewers |
| Custom Agents | Add your own review commands |

## Review Workflow

A typical review workflow:

1. Make your code changes
2. View changes in the [Diff Viewer](/docs/features/diffs)
3. Click **Review** to get AI feedback
4. Address suggestions
5. Commit when satisfied

## Tips

- **Review smaller changes** for more focused feedback
- **Use multiple agents** for diverse perspectives
- **Custom agents** can integrate with your team's tools
- **Combine AI review with human review** for best results
- **Check the terminal** for detailed feedback and suggestions
