Skip to content
mentoor

Topic 4 of 4 · 4 min read

Reviewing AI output at volume

Goal: Plan a review of a large AI-generated change by risk, set size limits, and decide when to send work back instead of reviewing it.

When agents write more code than people can read, the bottleneck moves to review. You cannot read everything with equal care, so read by risk, keep changes small, and send back work that is too big to review.

Check yourself · 1 of 3

An agent opens a 2,000-line PR. You have 45 minutes. Where should you start?

Choose one answer

Why volume breaks review

Review quality drops with size and time. The SmartBear study of a Cisco team found reviewers did best on 200 to 400 lines at a time and for under an hour. Google's guidance calls about 100 lines a reasonable change and 1,000 usually too large. An agent can produce 2,000 lines in a few minutes. If you review that like a 100-line change, you approve most of it unread.

Read by risk

Sort the files before you read them:

  1. High risk, read every line: authentication and authorisation, payments and money, data deletion and migrations, security-relevant config, public API contracts, concurrency.
  2. Medium risk, read the logic: business rules, data transformations, error handling.
  3. Low risk, skim and trust the tools: generated types, UI copy, formatting, test fixtures, docs.

The order is the point: if time runs out, it runs out on the low-risk files.

Keep changes reviewable

  • Ask for smaller changes. One concern per PR. Tell the agent: "Split this into separate PRs: the migration, the API change, the UI." It costs the agent seconds and saves you an hour.
  • Ask for a plan first. Review the agent's plan (files to touch, approach, risks) before it writes code. Catching a wrong approach in a 10-line plan is cheaper than in a 1,000-line diff.
  • Require evidence. Tests that fail without the change, a short note on how it was verified, screenshots for UI.

Know when to stop

Stop reviewing and send it back when:

  • The diff is too large to read the high-risk parts properly.
  • The approach is wrong. Line comments on a wrong design waste both sides' time.
  • You find the same mistake three times. Fix the prompt or the instructions file (for example, AGENTS.md or CLAUDE.md) and rerun, instead of fixing each copy by hand.

What AI review tools can and cannot do

Tools such as GitHub Copilot code review or a second agent can flag likely bugs and style issues in seconds. Use them as a first pass that reduces noise. They do not know your intent or your business rules, and they can be confidently wrong. They do not replace your approval on high-risk files.

What goes wrong

  • Reading files in diff order, so the auth change at file 23 gets tired attention.
  • Accepting a giant PR because "the tests pass".
  • Fixing the same agent mistake by hand ten times instead of changing the instructions.

Examples

A triage note for a 1,800-line agent PR

Read fully: auth/session.ts, migrations/0042_drop_legacy.sql, billing/refund.ts. Read logic: orders/*.ts. Skim: generated types.d.ts, locales/*.json, test fixtures. Ask the agent to split the migration into its own PR.

Fixing the cause, not the copies

The agent keeps catching broad exceptions and logging them. Instead of commenting on each one, add to the instructions file: "Never catch a bare Exception. Catch specific errors and re-raise unknown ones." Then rerun the task.

Key points

  • Review quality drops with size: about 200-400 lines per session is the evidence-based range.
  • Sort files by risk and read high-risk files (auth, money, data, config) line by line first.
  • Ask agents for smaller PRs and a plan before code; both are cheap for the agent.
  • Send work back when it is too big, the approach is wrong, or the same mistake repeats.
  • AI review tools are a useful first pass, not a replacement for approving high-risk code.

Common mistakes

  • Reviewing files in the order the diff lists them instead of by risk.
  • Approving a huge PR on the strength of a green CI run.
  • Leaving line comments on a change whose overall approach is wrong.
  • Treating an AI reviewer's "looks good" as approval for high-risk code.

Check yourself · 2 of 3

You find the same mistake in an agent's code for the third time. What is the best response?

Choose one answer

Check yourself · 3 of 3

What is the main limit of AI code review tools?

Choose one answer

Practice items, not counted towards your mastery.

Start here

More for this topic