Skip to content

How to review a pull request an AI agent wrote

These ten steps help you review a large pull request that an AI coding agent wrote. Each step works on its own, with no extra tools.

1. Review is slower after teams adopt coding agents

Fiona Chen and James Stratton at Harvard studied work data from 655 firms in "Artificial Intelligence in the Firm: Bottlenecks in Software Production" (version of November 14, 2026). After firms adopted AI coding agents, they opened 35.7% more pull requests, and the time from review submission to approval rose 56.1%. The authors conclude that code review becomes the bottleneck.

This is a working paper, and the authors do not say that a journal has peer reviewed it.

2. Start from the task

Before you open the diff, read the issue or spec the agent worked from. Write down, in a few lines, what a correct change has to do. Then check that the description of the pull request matches that task. If the description talks about work the task didn't ask for, note it now.

3. Check the size before you read

Look at the file list and the line count first. If the pull request mixes several unrelated changes, ask the author to split it before you review it, because a short pull request is faster to read than a long one.

4. Read by area

GitHub lists changed files by path, so a migration can sit between two test files. Group the files by the part of the product they touch, such as billing, auth, the API or the UI, and read one group at a time. That way you keep one area in your head instead of switching every few files.

StructPR is a GitHub App that does this grouping for you, and it's free for one repository.

5. Open the risky files first

Read these before the rest, because a mistake in them costs the most:

  • Database migrations
  • Auth and permissions code
  • CI and deploy config
  • Dependency changes, such as lock files and new packages

6. Treat the tests as evidence

Check that each new test would fail without the change. Look closely at any edit that weakens an existing test, such as a removed assertion, a looser match, a skipped case or a hardcoded result.

7. Look for changes nobody asked for

Agents sometimes touch files outside the task, add a helper that already exists, remove a check to make the tests pass, or rewrite code that already worked. Compare each change with the scope you wrote down in step 2, and flag anything outside it.

8. Ask for proof you can run

Ask for test output or a screenshot in the pull request description. When the change touches behavior that users see, run it yourself before you approve it.

9. Write comments the agent can act on

Point to the exact line and describe the behavior you expect. Write "this should return 404 when the repo doesn't belong to the user" instead of "this looks wrong". A comment like that lets the next revision fix the problem instead of starting over.

10. Measure your review queue

Track the time from review request to approval and how often reviewers send pull requests back for changes, which are the same kinds of measures the paper used.

Try it on your next agent PR

StructPR groups the files in each pull request by area, so you can read them one group at a time. The pricing page lists what each plan includes.