Hotfix Daily

Guide · Updated October 2026 · Last reviewed

How to review AI-written code: a checklist for agent PRs

Coding agents made writing code cheap. Checking it didn't get cheaper. A large Harvard study found that after firms adopted AI coding agents, pull requests took 49% longer to get through review, and reviewers asked for changes almost twice as often. This guide is a practical, tool-neutral checklist for reviewing a pull request an agent wrote: what to look at first, where agent code tends to go wrong, and how to set up your repo so CI on a clean checkout, not the agent's own terminal, decides what merges. Every study figure and GitHub setting below was checked on the primary source on October 29, 2026.

1. The verification gap, in numbers

The study is "Artificial Intelligence in the Firm: Bottlenecks in Software Production" by Fiona Chen and James Stratton of Harvard University (job market paper; first version January 7, 2026, current version August 4, 2026). It uses about 300 million work events (GitHub activity, Jira issues and Google Calendar events) from 718 firms, provided by the engineering analytics platform Jellyfish, and compares firms before and after they adopted AI coding assistants and agents.

After firms adopted AI coding agentsChangeBaseline
Lines of code+30%5,017 lines per worker-month
Commits / pull requests+20% / +23%Not restated here
Delivered output (Jira issues and epics resolved)Small, not statistically significant. Rules out a rise above 12%n/a
Time from PR submitted to merged+49% (+3.45 days)7.03 days
Share of PRs with changes requested+12 points, "nearly doubling the rate"13% of PRs
Review comments per PR+35% (+0.58)1.66
Share of workers doing code review+14%29% of workers

The authors' reading: writing code is only one step, and "written code must be reviewed and tested before it can be deployed to production." When agents speed up the writing, review becomes the bottleneck. They also report that the bottleneck "persists following the adoption of AI code review tools" and that "human reviewers continue to play a central role." AI coding assistants (autocomplete and chat) showed no significant effect on review time. The jump showed up with agents.

Our take: this is a working paper, not a peer-reviewed article, and it measures firm-level averages, not your team. But it matches what solo builders feel: the agent finishes in two minutes and you spend twenty working out whether to trust it. The fix isn't to stop reviewing. It's to review in a set order, and to let machines check what machines can check.

Chen & Stratton, Harvard (PDF, current version Aug 4, 2026) · figures from the introduction and section on code review

2. Rule one: CI on a clean checkout is the gate

A Hotfix Daily reader corrected one of our early tips, and they were right: "proof of done" isn't the agent's terminal output. The agent ran its tests in its own working copy, with your local files, caches, environment variables and whatever it installed along the way. None of that ships.

CI starts from a fresh checkout of the commit you're about to merge. That catches the file the agent created but never added, the test that only passes because your .env is there, the dependency installed globally but missing from the lockfile, and the step it quietly skipped. So:

Our safe-setup guide has a minimal GitHub Actions workflow you can copy.

Agents change every week. Your review habits shouldn't have to.

Hotfix Daily gives you five things worth knowing in AI coding and agents, with sources, plus one practical fix. Free, weekdays, about 3 minutes.

Join free and get 13 ready-to-paste Starter Prompts for coding agents, vibe coding and game dev right away.

Follow by RSS

3. The 5-minute first pass

Before reading a single line of logic, answer these. Most bad agent PRs fail here, and it costs you minutes, not an afternoon.

  1. Does the PR say what it was asked to do? Put your original request next to the description. If the agent "also refactored" things you didn't ask for, send those back as a separate PR.
  2. Which files changed? Run git diff --stat main...HEAD (or read the Files changed tab). Files outside the area you named are the first warning sign.
  3. How big is it? If you can't review it in one sitting, ask the agent to split it. Big diffs are where things slip through.
  4. Did any tests change? Check test files before the code. New tests are good. Edited or deleted tests need a reason.
  5. Did config change? Look for AGENTS.md, CLAUDE.md, agent settings folders, .mcp.json, .github/workflows/, package.json scripts, lockfiles, Dockerfiles and .gitignore. These change how code runs or gets checked, so read every line.
  6. Is CI green on this exact commit? If not, stop here.

4. The full checklist for agent PRs

Once the first pass is clean, go through these in order. They're tool-neutral: they work the same whether the PR came from a terminal agent, an IDE agent or a cloud agent.

Scope and intent

Tests

Correctness and "does this exist?"

Dependencies

Security and data

Before you merge

5. Red flags in agent-written PRs

You seeWhat to check
"Fixed the failing test"Did it fix the code, or change the test? Read the test diff first.
"All tests pass" but no CI runPush it and wait for CI on a clean checkout. The agent's terminal isn't proof.
A new package you don't recognizeIs it real, maintained and the one you meant? Was it needed at all?
Changes to workflow, agent or build configRead every line. These files decide what gets checked and what runs.
A very large diff for a small askAsk for a smaller PR limited to the request.
try/catch added around the failing lineIs the error handled, or just hidden?
A call to a function you've never seenCheck it exists in your library version.
Hard-coded values in place of configTest-only shortcuts that will break in production.

6. Make the repo enforce it (GitHub)

Checklists slip when you're tired. Branch protection doesn't. GitHub's protected branches page lists the settings that matter for agent PRs. On main:

Our take: if you work alone, required status checks are the one to turn on today. Required reviews matter once a second person, or a second agent, can open PRs.

About protected branches · About code owners · checked Oct 29, 2026

7. Make review cheaper before the PR exists

The study's point is that review is now the slow part. You can shrink it at the start:

A prompt you can paste at the end of any agent task:

Before you say you're done:
1. List every file you changed and why.
2. List any test you added, edited, skipped or deleted, and why.
3. List any new dependency and why it's needed.
4. Paste the exact test command you ran and its output.
5. Tell me what you did NOT verify.
Then open a pull request and wait for CI.

The printable version

FAQ

Does AI-generated code take longer to review?

In one large study, yes. A Harvard working paper by Fiona Chen and James Stratton (current version Aug 4, 2026), covering 718 firms, found that after firms adopted AI coding agents the time from opening a pull request to merging it rose 49% (from a 7.03-day baseline), the share of PRs with changes requested nearly doubled, and comments per PR rose 35%. It is a working paper, not a peer-reviewed article.

Is it enough that the agent says the tests pass?

No. The agent ran the tests in its own working copy, with your local files, caches and environment variables. CI runs them on a fresh checkout of what was actually committed, which catches files the agent forgot to add and tests that only pass on your machine. Make that CI check required before merging.

What should I look at first in an AI agent pull request?

Start with the list of changed files (git diff --stat) and compare it with what you asked for. Then check whether any test files changed, whether new dependencies appeared, and whether agent or CI config files such as AGENTS.md, .github/workflows/ or package.json scripts were touched. Only then read the code line by line.

Can an AI code reviewer replace a human reviewer?

Not on its own. In the Harvard study, the review bottleneck persisted after firms adopted AI code review tools, and human reviewers stayed central. An automated reviewer is useful as a first pass, but a person should still check intent, tests and anything touching security, money or data.

How do I make GitHub enforce these checks?

Use a branch protection rule or ruleset on main: require a pull request with at least one approving review, require status checks to pass (your CI job), and optionally require branches to be up to date, dismiss stale approvals when new commits are pushed, require approval of the most recent push by someone other than the pusher, and require review from code owners.

Found this useful? Hotfix Daily covers AI coding agents and the habits that keep them honest every weekday. Get the updates free, plus 13 Starter Prompts. Or share it on X.

Related

How we write these: we read the primary source on the date shown and link it for every figure and setting we name. Study figures come from the authors' own PDF. "Our take" lines are our opinion. This guide is tool-neutral and has no affiliate links or sponsors.

Get the next issue in your inbox

Five things worth your attention in AI, agents, vibe coding and game dev, every weekday. Plus 13 free Starter Prompts and the AI Builder Starter Stack PDF when you join.

Follow by RSS