AI code review: make an agent your first reviewer, not your last
The agent finished while you were in standup. A 340-line diff is parked on the branch: cursor pagination for the activity feed, the task you wrote up this morning. It compiles, the tests are green, the summary is confident.
Now comes the part that actually costs you: reading it. You are the only reviewer that diff has. Or you were. The cheapest upgrade available today is to make another agent read it before you do: not a replacement for you, but a first pass that clears the mechanical findings away, so the one pair of human eyes in the loop gets spent where it matters.
What AI code review actually catches
Hand the pagination diff to a fresh agent session with a hostile brief ("list reasons to reject this") and it returns three findings:
- When two events share a timestamp, the last item of page one repeats
as the first item of page two. The cursor compares on
created_atalone; ties need the id as a tiebreaker. - The new test asserts a 200 and twenty items. It never crosses a page boundary, so it stays green with the duplicate bug in place.
- The old
offsetparameter is still accepted and silently ignored, which turns every existing caller into a liar.
None of these findings require taste. They require holding the whole diff in working memory and checking it against the brief: exactly what a fresh context window does well and a human at 4pm does badly. Agent reviewers are strong on edge cases, dead code, contract drift, tests that assert nothing, and confidently invented APIs. That tier is most of a review's volume, and almost none of its judgment.
The fresh-context rule of agent review
The obvious shortcut fails. Asking the session that wrote the code "anything wrong with your diff?" produces a light polish and a compliment. The writer session is anchored on its own plan; every decision in that diff is one it already justified once, and models, like people, defend their own work.
Review quality comes from distance, and with agents distance is cheap:
- Fresh session, always. The reviewer gets the diff and the original task, never the writer's chat history.
- Different model when you can. Two models trained differently miss differently.
- A rejection brief, not a summary brief. "Summarize this change" yields praise. "List reasons this should not merge, with file and line" yields review. Cap the list, demand severity labels, and allow "no blocking issues" as a valid answer so the agent is not forced to invent problems.
Wiring the review pass into your workflow
Start manual, promote what works:
At your desk. Before you read any agent diff, open a fresh session and hand it the diff plus the task. Read its findings, then the code. Two minutes, and your own pass starts oriented instead of cold.
In a script. The desk ritual, typed once. Piping git diff main
through a rejection brief as a
one-shot shell command means a
Makefile target or a pre-push step can run the same check on every
branch, for everyone.
On the pull request. GitHub's own writeup on reviewing agent pull requests describes the volume problem: agent PRs arrive faster than review habits were built for. Claude Code on GitHub Actions meets the diff where it lands, reviewing when a PR opens and again on each push, under its own bot identity. Your approval stays required; the bot guarantees the first pass happened.
Whatever the rung, the reviewer runs the checklist you already use by hand: does it match the brief, did the scope creep, are the edge cases handled, do the tests prove anything. That checklist, and the human pass it feeds, is covered in how to review AI-generated code; the agent's job is to arrive with the mechanical rows already filled in.
Where AI code review goes wrong
The honest section, because a bad review pass is worse than none:
- The nitpick flood. Default settings produce twelve comments per diff, nine about naming; developers learn to scroll past the bot. Cap findings, set a severity floor, and delete every rule you would not enforce in person.
- Rubber-stamp drift. The dangerous failure is not a bad bot comment; it is the week you quietly stop reading diffs because "the bot passed it." The agent is the first reviewer. The moment it becomes the last one, you are shipping unreviewed code with an alibi.
- Shared blind spots. A reviewer on the same model, prompted the same way, can inherit the writer's assumptions, and the tiebreaker bug gets missed twice for the same reason. Vary the model, or at least the prompt.
- Judgment does not delegate. Whether cursor pagination was the right call at all, whether the endpoint should exist, whether the contract change breaks a paying customer: the reviewer agent has no idea. It reads code, not roadmaps.
- It is not free. A review on every push across every open branch is a line item. Fold it into the same ledger you use to measure whether agents pay off, and count the review minutes it actually saves you.
A board where both reviewers have a lane
The workflow has moving parts per task: a writer session, a reviewer session, a human pass. Loose terminals lose that structure by lunchtime.
SanuDesk is a desktop app shaped like the workflow. Your Claude Code, Codex and Gemini sessions tile into one grid, next to a Kanban board that dispatches the work. The pagination task starts as a card, deploys to a fresh writer session with one click, and when the agent stops, the card parks in a review lane with a note on what changed and how to test it. From there, deploy a review card to a second fresh session, and because SanuDesk is bring-your-own-model, the reviewer can run on a different model than the writer, the cheap insurance the fresh-context rule asks for. Writer and reviewer sit side by side in the grid, nothing merges until you read the card, and the recurring sweeps (a nightly rejection-brief pass over open branches) become Loops: the same brief on a schedule, every run journaled. The grid and board are in the free plan (details on pricing).
Run the two-reviewer experiment
The next agent diff you get, do not read it yet. Open a fresh session, paste the diff and the original task, and ask for reasons to reject, with file and line, or "no blocking issues." Then do your own pass and keep two numbers: findings you would otherwise have caught yourself, and minutes your pass took compared to normal.
If the first number is zero, your diffs may already be small and clean. In most codebases it is not zero, and the second number drops fast once your pass starts where the agent's ended. Then make the winner permanent: promote the prompt to a script, or give it a lane on the board.
Download SanuDesk free to give the writer, the reviewer and your own pass one grid and one board, or see how the review loop fits together on the features page.