Changes this week

CodeBy Serchai · Published on · 4 steps

How to review AI-generated code without anything slipping through

Guide to reviewing agent code: the three-pass technique, CodeRabbit as first filter and the typical failures AI commits with confidence.

ToolsCodeRabbit · Claude Code · GitHub Copilot
Stack costFrom $51/mo
Updated

00Tools you will use

Stack: From $51/mo
Card 01/03 · First filterFREE + $24

CodeRabbit

3.7Fair

Automatic pull request review with context: it comments before a human arrives.

PriceFree + from $24
JobReviews every pull request and comments line by line before your reading.
Read the review ↗
Card 02/03 · Main agent$17

Claude Code

4.0Good

Anthropic's coding agent: works in your terminal, your IDE and the web.

PriceFrom $17
JobGenerates the code that reaches review, with an instructions file that absorbs every finding.
Read the review ↗
Card 03/03 · Light reviewFREE + $10

GitHub Copilot

3.9Fair

The coding assistant built into GitHub and your IDE, from $10.

PriceFree + from $10
JobCovers part of the first filter if the team already lives in GitHub, shallower than CodeRabbit.
Read the review ↗

TLDR: Agent code arrives in volume and with a confidence that invites trust, and there lies the trap: AI fails in patterns of its own that classic review does not look for. The system: CodeRabbit as the automatic first filter of every pull request, your review in three passes (perimeter, tests, logic) and every finding converted into a permanent instruction. Review is not the agent’s toll: it is your half of the work.

his guide is for developers already delegating to agents who notice the bottleneck has moved: it is no longer writing, it is reviewing. It is the natural consequence of the system built in the first project with agents guide, and it deserves its own technique.

The presiding principle: the volume of generated code does not lower the standard of what gets merged. It changes how you review, not how much it matters.

1. Let the machine catch the mechanical first

The first pass should not be yours. CodeRabbit reviews every pull request as it opens: it summarizes what changes, flags probable bugs, edge cases and obvious security problems, and comments line by line with project context. Free for open source projects, with a limited free tier on private repositories and from $24 a month.

The effect on your review is a filter: by the time you arrive, the mechanical is flagged and your attention goes to what the machine does not see. And there is a symmetry that works: one AI reviewing another is not redundancy, because the reviewer carries neither the generator’s context nor its decisions, and sees the change with clean eyes.

If your team already lives in GitHub with Copilot, its PR review, built into the platform, covers part of this filter: shallower, same first-pass function.

2. Review with the three-pass technique

Effective review of agent code has an order, and the order is what makes it sustainable at volume.

The three-pass technique

01PerimeterDoes the change touch what the task asked and nothing else? Seen in ten seconds looking at the touched files.
02TestsDo they exist, pass and test what matters? Suspect the tautological test.
03LogicThe fine reading of the new code, with attention to the edges: empties, nulls, errors, concurrency.

The classic agent drift is the fix that takes the opportunity to “improve” things nobody requested, and that excess is detected looking at the perimeter, not reading diffs. The generated test has its own pathology: the one verifying that the code does what it does instead of what it should do, and reading the assertions with that specific suspicion is the vaccine.

3. Know AI code’s characteristic failures

Agent code does not fail like human code, and knowing its pathology directs the search. The classics: plausible invention (the library function that does not exist, the parameter that sounds right), edge confidence (the impeccable happy path and the unhandled edge), silent duplication (reimplementing what the project already had, for not having found it), and confident obsolescence (the pattern from three library versions ago, written with total assurance).

Each has its cheap detector: dependencies and imports verify in seconds, edges get asked systematically (what if it comes empty?), duplication gets caught with a name search, and the obsolete surfaces when the tests actually run.

Your review stops being general reading and becomes directed search.

Why this technique is faster

4. Turn every finding into prevention

Review that only corrects is half the system. Every caught failure is information about what the agent did not know about your project, and its natural destination is the repository’s instructions file: the convention it violated, the library it should have used, the house’s error-handling pattern.

That cycle (failure, correction, instruction) is what stops the same error returning, and explains why teams months into agents review less and less of the same thing. A mature instructions file is accumulated review.

With review solved, the system scales toward volume: the parallel agents guide multiplies the work with review as the conscious limit, and security of generated code goes deep on the pass that admits no shortcuts. The whole sector lives in AI for software development.

Common mistakes

Approving on accumulated trust. It is agent review’s terminal failure: every success erodes the discipline, and the cost arrives concentrated on the day you should have read.

Reading the diff line by line from the start. Without the perimeter pass first, you spend attention on changes that perhaps should not exist, and arrive tired at the logic that mattered.

Trusting that tests pass. The tautological test always passes: verify the assertions, not the green color.

Correcting without updating the instructions. The same failure will return next session, because the conversation is forgotten and the file is not.

Frequently asked questions

How long should reviewing an agent’s work take?

With the automatic filter and the three passes, a medium task reviews in minutes. If review takes longer than doing the task, the task was badly sliced or the trust rung badly chosen.

Is AI reviewing AI not a vicious circle?

No: the automatic reviewer shares neither the generator’s context nor its decisions, so it sees the change with clean eyes. The generator, automatic reviewer and human combination is well-built redundancy.

Which AI failure is the most dangerous?

Plausible invention in dependencies and APIs, because it compiles badly or fails at runtime in strange ways, and the confidence it is written with disarms suspicion. Verifying imports and functions is the most profitable pass.

Can I skip review on trivial tasks?

You can decide trust rungs with light review, and even there the perimeter and tests get looked at. The day the trivial task touches a file it should not, that ten-second glance is what catches it.

The steps, in short

  1. Let the machine catch the mechanical first

    An automatic pull request reviewer filters the obvious errors before spending your attention.

  2. Review with the three-pass technique

    Change perimeter, tests and fine reading of the logic, in that order.

  3. Know AI code's characteristic failures

    Agents fail in recognizable patterns, and knowing them turns your review into a directed search.

  4. Turn every finding into prevention

    What you catch in review goes back into the instructions file so it does not repeat.

Code

Related guides

Which tool will you pick? See the full code ranking.

See the category ranking
What do you want to do?
Assisted decision · ES/ENRequirements · price · limitations · dated sources

What do you want to do?

Tell us in the same words you would use with another person.

We keep a sanitised query for 90 days to improve the engine. Privacy.