How Do You Review a Pull Request Written by an AI Agent?
The interviewer asksA teammate opens a 600-line pull request mostly written by an AI coding agent. How do you review it?
AI Product EngineerForward Deployed EngineerProduct Builder (secondary)CoreBuild roundRepresentative5–7 min
On this page
The 30-second version
- Same bar as any code: the author owns it, not the AI.
- Ask for intent and test evidence first; 600 lines is too big: split it.
- Watch for AI-typical problems: plausible but wrong logic, invented functions, unneeded changes, weak tests.
- Run it and the tests; check edge cases and error handling.
- Security: secrets, input handling, dependencies.
What it's really testing
- Reviewing AI-generated code
- Ownership
- Practical review habits
How to structure your answer
- Ownership.
- Size.
- AI-specific checks.
- Testing and security.
The interview, played out
- InterviewerA teammate opens a 600-line pull request mostly written by an AI agent. How do you review it?
- CandidateSame bar as any code: the author owns every line, whoever typed it. First I'd ask what it's meant to do and how they tested it.
- Candidate600 lines is too big to review well. I'd ask them to split it into smaller changes that each do one thing.
- Strong movePushes back on size before reviewing.
- CandidateThen I watch for things agents often produce: logic that looks right but handles edge cases wrongly, calls to functions that don't exist or behave differently, unrelated changes slipped in, and tests that only test the happy path.
- InterviewerAnything else?
- CandidateRun it and the tests myself, try a few bad inputs, and check security: no secrets, inputs validated, no unnecessary new dependencies.
The strong answer, distilled
- Ownership: the author owns it.
- Intent and evidence first.
- Split: smaller, single-purpose changes.
- AI-typical issues: wrong edge cases, invented calls, unrelated changes, weak tests.
- Run and probe: tests, bad inputs, security.
This is one strong answer, not the only one.
How it's scored
| Dimension | Weak (2) | Passable (3) | Strong (5) |
|---|---|---|---|
| Ownership | AI's fault | Author reviews | Author owns every line |
| Process | Read top to bottom | Asks questions | Split, intent, evidence |
| Checks | Style | Tests | AI-typical issues and security |
Round scorecard: FDE: technical and build round, filled in for the mock candidate
| Dimension | Weak | Passable | Strong | The mock candidate |
|---|---|---|---|---|
| Clarifying | Starts coding immediately. | Asks a few questions. | Pins down the goal, inputs and what done means first. | Strong. Asked for the intent and how it was tested. |
| Approach | Unworkable or over-built. | Workable. | The simplest approach that works, stated before building. | Strong. Asked to split into smaller changes. |
| Testing | Tries one happy-path input. | Tries a few inputs. | Tests varied and bad inputs, and checks outputs systematically. | Strong. Ran tests and checked edge cases. |
| Trade-offs | None mentioned. | Some. | Says what was cut, why, and what comes next. | Strong. Same bar as human code, with AI-specific checks. |
How the answer changes by role
| Role | What to emphasise |
|---|---|
| AI Product Engineer | Team review norms |
| Forward Deployed EngineerForward Deployed Engineer. An engineer embedded with customers who scopes, builds and ships AI solutions into production. Read the full explanation | Reviewing fast in customer settings |
| Product Builder | Self-review when building alone |
Common mistakes
- Approving because tests pass
- Reviewing a huge diff at once
- Lower bar for AI code
More follow-ups to practise
- "The tests were also AI-written." Hint: check they fail when the code is wrong.
- "Team velocity is the priority." Hint: smaller changes review faster.
Go deeper
- Module: Building with AI tools
- Framework: Build Round Framework
- Framework: Opening Any Interview Answer
- Lesson: Working with coding agents
- Also tests: Agent and RAG evals
Sources
Representative question: written to match build rounds for AI product roles, not a specific reported interview.