Review code with Codex
codex_reviewRun automated code review on uncommitted changes, branch diffs, or specific commits, with optional custom instructions.
Instructions
Run a Codex code review over uncommitted changes (default), a diff against a base branch, or a specific commit. Optionally steer it with custom instructions.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Working directory for the run. Must sit inside the server allowlist. Defaults to the first allowed root. | |
| base | No | Review the diff against this base branch. | |
| model | No | Model slug, e.g. "gpt-5.5". Defaults to the Codex configuration. | |
| title | No | Title shown in the review summary. | |
| commit | No | Review the changes introduced by this commit SHA. | |
| config | No | Raw Codex config overrides as key=value, TOML-parsed, e.g. 'model_reasoning_effort="high"'. | |
| enable | No | Codex feature flags to enable for this run. | |
| images | No | Image files to attach to the prompt. Each must be inside the allowlist. | |
| prompt | No | Custom review instructions, e.g. "focus on race conditions". | |
| disable | No | Codex feature flags to disable for this run. | |
| sandbox | No | Sandbox for commands Codex runs. "read-only" forbids writes, "workspace-write" (default) allows writes inside the workspace, "danger-full-access" removes all limits and is refused unless the server was started with CODEX_MCP_ALLOW_DANGEROUS=1. | |
| worktree | No | Run in a fresh managed git worktree instead of the working directory. | |
| ephemeral | No | Do not persist the session to disk. It cannot be resumed afterwards. | |
| uncommitted | No | Review staged, unstaged and untracked changes. This is the default. | |
| output_schema | No | Path to a JSON Schema file constraining the shape of the agent final response. | |
| timeout_seconds | No | How long to wait inline before handing back a job_id and continuing in the background. 0 means return immediately. Defaults to the server setting (120s). | |
| skip_git_repo_check | No | Allow running outside a git repository. | |
| dangerously_bypass_approvals_and_sandbox | No | Remove every approval and sandbox check. Refused unless CODEX_MCP_ALLOW_DANGEROUS=1. |