How to review AI-generated pull requests
Review an AI-generated pull request by checking it against the task first, then the tests, then the code. An agent’s pull request does not come with the author’s promise that they read and ran it, so ask for proof.
Why are agent pull requests harder to review?
When a person opens a pull request, you can assume they read their own change and ran it. With an agent, you cannot assume either. A diff also shows what changed, not what the software does.
Agents also open pull requests faster than people can read them, so review becomes the slow step.
What should you check, and in what order?
- Compare it with the task. Read the issue or the prompt first. Does the change solve that problem?
- Read the test changes first. A weakened or deleted test can make a broken change pass.
- Ask for proof it ran. Test output, a preview or a recording.
- Read the code for intent. Look at naming, edge cases and anything the agent decided that you would not have.
- Send failures back with steps to reproduce them.
GitHub’s own guidance on reviewing agent pull requests covers much of the same ground.
How do you keep review from becoming the bottleneck?
- Review while the agent works, not after. A wrong turn is cheap to fix in the first few minutes.
- Let automated checks handle formatting and known problems, so people can judge intent.
- Keep changes small, with one task per pull request.
- Ask the agent to say what it did not check.
How does a shared session help?
In a Friday shared session, reviewers watch changes as they happen and can suggest a redirect that lands at the agent’s next step. The tree marks each changed file with the person or agent working in it.
When the work is ready, you read the diff and accept it or ask for changes. You can undo a run, or commit and open a pull request.
Common questions
Should a person always review?
Automated checks help, but a person should decide whether the change solves the right problem before it ships.
Can one agent review another’s work?
Yes, as a first pass. You can save a Reviewer agent with your checklist and add it to any session. A person still makes the call.
How big should an agent’s pull request be?
Small enough to read in one sitting. One task per pull request is a good rule.