Skip to content
mentoor

Topic 2 of 5 · 4 min read

Managing review load from agent PRs

Goal: Set team limits on agent PR size and author self-review that keep review time per change under control.

Agents can write code faster than people can read it, so the team must limit what reaches a reviewer: small changes, a self-review first, and a clear owner for every pull request. Review is now the bottleneck, and it is where quality is decided.

Check yourself · 1 of 3

An engineer used an agent to build a feature. Who should read the full diff first?

Choose one answer

Why it matters

An agent can open five pull requests before lunch. A reviewer cannot read five large diffs carefully in that time. The result is rubber-stamping: approvals in a minute, bugs found in production. Research summarised by SmartBear on the Cisco study found that review quality drops when sessions are long and diffs are big; the rule of thumb it reports is 200 to 400 lines per session and under an hour. Google's engineering guide makes the same point: small changes are reviewed faster and more thoroughly.

Rules that keep the load manageable

  1. A size limit. Agree a line count, for example "over 400 changed lines needs a split or a written reason". Tell the agent in the memory file to split work by behaviour: one change, one purpose.
  2. Author self-review first. The person who prompted the agent reads the full diff before asking anyone else. They remove unrelated edits, check the tests, and write the description in their own words. A reviewer should never be the first human to read the code.
  3. One accountable owner. Every pull request has a human author. "The agent did it" is not an owner.
  4. Automated checks before humans. Formatter, linter, type check and tests must pass before a review is requested, so people spend time on logic and design.
  5. Send work back, cheaply. If a diff is too large or unexplained, the reviewer says "split this" and stops. Reading half of an oversized change and commenting on it wastes the time you are trying to save.
  6. Spread the load. Use code owners and rotate reviewers so one senior engineer is not the only gate.

Before and after

Before: an engineer asks an agent to "add team invitations". It returns one change with 1,400 changed lines across the API, UI, emails and a migration. Two reviewers skim and approve.

After: the engineer reads it first, sees the agent also reformatted six unrelated files, and asks for four changes: migration and model, API, emails, UI. Each is small, has its own tests, and gets a real review.

What goes wrong

  • Counting approvals, not review quality. Fast approvals look like throughput.
  • Using another AI as the only reviewer. A model reviewer can help as a first pass, but it shares blind spots with the author model, and a human still owns the merge.
  • Silent scope creep. The agent "tidies" unrelated files, which hides the real change in the noise.

Examples

A team limit written down

The team adds three lines to its contributing guide: pull requests over 400 changed lines need a split or a one-line reason; authors tick "I read the whole diff" in the template; checks must be green before review is requested.

Sending it back

A reviewer opens a 1,100-line agent pull request with the description "implements feature". They reply "Please split into model, API and UI changes and describe what each does" and review nothing else. The author reruns the agent with that split.

Key points

  • Review is the bottleneck for agent-written code, so protect reviewer attention with limits.
  • Set a team size limit for pull requests and ask the agent to split work by behaviour.
  • The author reads and cleans up the full diff before any reviewer sees it.
  • Every pull request needs a named human owner, and automated checks pass before review starts.
  • Reviewers should send oversized or unexplained changes back instead of reading them in part.

Common mistakes

  • Letting reviewers be the first people to read the agent's output.
  • Judging the process by how fast pull requests are approved.
  • Accepting one huge change because splitting it feels like extra work.
  • Treating an AI review comment as a replacement for a human approver.

Check yourself · 2 of 3

A reviewer opens a 1,400-line agent pull request with no explanation. What is the best response?

Choose one answer

Check yourself · 3 of 3

Why does a team add a size limit to agent pull requests?

Choose one answer

Practice items, not counted towards your mastery.

Start here

More for this topic