How to review code an AI wrote
AI-written code fails in different places than human code. Review the diff for what it quietly removed, invented, or widened, not just what it added.
Most code review habits were built for code a colleague wrote slowly, with context, and with a reason for every choice. Generated code arrives fast, reads fluently, and carries none of that. A diff that looks tidy and passes the tests can still be wrong in ways a skim will not catch.
We have changed how we review it. The short version: read the diff for what it took away and what it made up, because that is where generated changes go wrong.
Look for what it removed
The most useful habit is to read the deletions first. A model asked to make a failing test pass has two easy options, and one of them is to change the test. Watch for the quiet versions of that:
- An assertion loosened, a case deleted, or a test skipped with a comment about flakiness.
- A validation check removed because it was “redundant” with something elsewhere.
- A narrow error handler replaced by a broad one that swallows everything and moves on.
- A timeout, a limit, or a retry ceiling dropped because it got in the way.
None of these look like bugs in the added lines. They only show up if you ask what the code was protecting against before the change.
Look for what it invented
Models write plausible code, and plausible is not the same as real. Check the things that cannot be checked by reading style: that the library function exists in the version you actually have installed, that the configuration key is one the tool honors, that the package it imported is the one you meant and not a near neighbor with a similar name. Anything new in the dependency list deserves a look before it deserves a merge.
The same goes for behavior it assumed. If the change calls an internal service, confirm the contract in the service, not in the model’s confidence about it.
Keep the diff small enough to hold in your head
Review quality falls off quickly as a diff grows, and generation makes large diffs cheap. The fix is to refuse them. Ask for one change at a time, keep unrelated cleanup out of the same commit, and send back anything you cannot explain after one read. A reviewer who approves a change they only partly understood has not reviewed it; they have witnessed it.
It also helps to read the change from the outside first. Run it, hit the failure path on purpose, and look at what a user or an operator would see, before you read a line of the implementation. Working behavior is the claim; the code is the evidence for it.
Make the person accountable, not the process
A checklist helps, but the check that matters is whether the reviewer could defend each change without opening the transcript that produced it. If the honest answer is no, the change is not ready, no matter how green the pipeline is. We wrote about why that accountability has to sit with a named senior engineer in vibe coding needs a senior engineer on the hook; review is where it becomes daily practice.
This is how we review in our vibe coding and AI-native delivery work: deletions first, inventions second, small diffs throughout, and an engineer who can explain every line that ships.
Written by Tommy Shrove, BluuAlpha Technologies.