Inspect

Review agent

Review agent reviews pull requests in your GitHub repositories and posts its findings as inline review comments. Each review runs a general reviewer over the whole change plus separate reviewers for security, logic, API contracts, data integrity, performance, and test design. Repository rules add your own specialist reviewers to that panel. Review agent re-reviews each new commit.

Reading code review findings

Requirements

  • Any member can turn reviews on for their own pull requests in a repository.
  • The Edit repositories role or Admin can turn reviews on for every pull request in a repository.
  • The Manage code review role or Admin can change models, timing, cost limit, and skipped branches for the organization.
  • Anyone who can merge to the repository can add rules or orchestration instructions, since the files live in the repo.

Choose which pull requests get reviewed

The Repositories table in Settings → Review agent has two settings per repository:

  • My PRs, turned on with Every PR of mine, reviews pull requests you author. This is your personal preference.
  • Repository-wide, turned on with Every PR, reviews pull requests from every author.

Either setting can instead be Every Inspect PR, which reviews only pull requests linked to an Inspect session.

A pull request is reviewed when either applies. Select several repositories to change them in bulk. Check rules looks for a rules file on the default branch.

You can also set the repository-wide value through the API as automatic_reviews (on, inspect, or off) on a repository.

Skip reviews on a pull request

Add the disable-inspect-review label to opt a pull request out of automatic reviews and push re-reviews. If a review is already running when the label is added, Inspect cancels it, marks its in-progress checks as canceled, and archives the review session. Removing the label resumes automatic reviews on the next push. Explicit requests (/inspectreview, trigger-inspect-review, or starting a review in Inspect) still run.

Timing and drafts

Timing sets when the organization's reviews run. The default, On every commit, only when Ready for review, holds drafts until they are marked ready. On every commit reviews drafts too.

Each person can override this for their own drafts with Review Pull Request drafts in Settings → Agent.

Request a review

  • Comment /inspectreview on a pull request. Text after the command is passed to Review agent as an extra request. /review is an alias, unless it has been turned off for your organization because your own tooling uses it. Commands inside code blocks and inline code are ignored.
  • Add the trigger-inspect-review label, for example from a GitHub Actions workflow. Inspect removes the label once the request is queued, so you can add it again later.

Either one starts Review agent if it is not running, reviews the current head, and resumes a review paused at the cost limit. With the label, if the diff has not changed since the last review, Review agent rechecks its open findings against the current code instead: it resolves the ones that no longer apply and posts a short comment listing what it resolved and what is still open.

To challenge a finding or ask for a fix, reply on its thread and mention @inspect.

Cost limit

Cost limit pauses automatic re-reviews of a pull request once its review session has cost a set amount. It is on by default at $10 per pull request. When it trips, Review agent posts a comment with the cost so far and a Resume Inspect reviews for this Pull Request checkbox. Checking it resumes reviews; only people with write access to the repository can resume. Commits pushed while a review is paused are not reviewed until it resumes.

Models

In Settings → Review agent you set a model and reasoning effort for three roles:

  • Orchestrator model plans the review, dispatches the reviewers, and writes the review. System default: gpt-6.1-sol, high.
  • Generalist reviewer model reviews the whole change. System default: gpt-6.1-sol, xhigh.
  • Sub-reviewer model runs the specialist reviewers, the test reviewer, and repository rules. System default: gpt-6.1-sol, high.

Supported efforts are low, medium, high, and xhigh. A role left on System default uses the default above. If you pick a model without an effort, or an effort the model does not support, the role runs at high, or at the model's first supported effort when it has no high.

Organizations that chose a single model before per-role settings existed keep that choice for all three roles until someone saves the settings again.

The models are fixed when a review session starts. Restart Review agent on a pull request to apply a change to a run already in progress.

Merge queues

Review agent only reviews pull request heads, so a merge queue that waits for required checks on its own branch would never see Review agent's checks complete. List branch patterns in Skipped branches, one regular expression per line, such as ^gh-readonly-queue/ for GitHub merge queues. Commits pushed to a matching branch get Review agent checks completed as skipped, which satisfies required checks. Branches with an open pull request are excluded.

When Trunk is connected in Settings → Integrations, branches starting with trunk-merge/ are always skipped, including the draft pull requests Trunk opens to test queued changes.

Repository rules

.inspect/reviews/rules.yml adds specialist reviewers and sets repository model defaults. Inspect reads it from the pull request's head commit, so you can iterate on rules within the pull request that changes them.

Adding a specialist reviewer for your codebase

version: 1
model: gpt-6.1-sol
reasoning_effort: high
rules:
  - id: security-sol
    skill: security
    model: gpt-6.1-sol
    reasoning_effort: xhigh
    files: ['src/**']
    condition: Authentication or authorization behavior changes
  - id: security-opus
    skill: security
    model: claude-opus-5-5
    files: ['src/**']
    condition: Authentication or authorization behavior changes
FieldTypeRequiredDefaultDescription
version1YesFormat version. Must be 1.
modelstringNoReplaces the organization model for all three roles in this repository.
reasoning_effort'low' | 'medium' | 'high' | 'xhigh'NoReplaces the organization effort for all three roles.
rules[].idstringYesUnique within the file. Lowercase letters, digits, and hyphens, up to 40 characters, starting with a letter or digit.
rules[].skillstringYesThe skill the reviewer runs, by name. Lowercase letters, digits, and hyphens, up to 64 characters.
rules[].filesstring[]NoGlobs. The rule is considered only when the pull request changes a matching file. ** crosses directories.
rules[].conditionstringNoFree text. The orchestrator checks it against the diff and runs the rule only when it applies.
rules[].modelstringNoSub-reviewer modelModel for this rule's reviewer.
rules[].reasoning_effort'low' | 'medium' | 'high' | 'xhigh'NoSub-reviewer effortEffort for this rule's reviewer.

A rule with neither files nor condition runs on every review. Rule reviewers are added to the built-in panel; the security rules above run in addition to the built-in security reviewer. Rules that resolve to the same skill, model, and effort share one reviewer, so the example runs two separate security reviews.

The skill can come from your Inspect skill catalog or from the repository, at .agents/skills/<skill>/SKILL.md or .claude/skills/<skill>/SKILL.md. A rule effort that its model does not support runs at high, or at the model's first supported effort. Restart an existing review to pick up model changes.

Personal rules

A file at .inspect/reviews/users/<github-login>/rules.yml uses the same format and applies only to pull requests that person authored or reviews. Add applies_to to a rule to narrow it: authored, reviewing, or both (the default). The author's file always loads; reviewers' files load for at most three reviewers per pull request.

Orchestration instructions

Rules add things to check. To change how the review is written or what it should skip, add .inspect/reviews/ADDITIONAL_ORCHESTRATION.md in plain Markdown:

- Do not report naming, formatting, or import-order findings; our linters cover them.
- Do not flag missing tests for changes under `scripts/`.
- Keep the summary to three bullets or fewer.

Inspect reads it from the pull request's head commit and adds it to the orchestrator's instructions on every review and re-review. Only the first 60,000 characters are used. When an instruction conflicts with Review agent's standard process or severity rubric, the standard process wins. A pull request picks up the file only once its branch contains it, for example after you merge it to the base branch and update the pull request.

Troubleshooting