How to review what a coding agent changed before you merge
4 min read
A coding agent can change a dozen files in the time it takes to make a cup of tea. That speed is the point, and also the risk: the changes arrive faster than you can read them, and "it looks fine" turns into "it is merged" without anyone really checking.
Reviewing agent work is not a new skill. It is the same code review you would give a teammate, with a few habits adjusted for how agents behave. This guide gives you a routine you can run in about ten minutes, whichever agent or editor you use.
Start with the size of the change
Before you read a single line, find out how big the change is:
git status
git diff --stat
git status shows what is modified and what is new. git diff --stat lists every file with a count of added and removed lines. Two things are worth noticing right away:
- Files you did not expect. An agent asked to fix a bug in one module has no business rewriting your build config. Unexpected files are the first thing to question.
- A very large diff. If the change is too big to read in one sitting, it is too big to merge in one piece. Ask the agent to split it, or review it commit by commit.
Read the diff before you run anything
It is tempting to run the app first and see whether it works. Read the diff first instead, because working code can still be wrong code: it can pass today and break on the first edge case.
git diff
When you read, look for the things agents get wrong most often:
- Changes that go beyond the request. Renamed variables, reformatted files and "while I was here" cleanups make a diff harder to review and easier to hide a mistake in.
- Deleted code and deleted tests. If a test was removed or weakened so that the suite passes, that is not a fix.
- Hard-coded values. Paths, URLs, keys and sample data that were pasted in to make something work.
- Plausible but invented details. A function call, option or import that looks right but does not exist in the version you use. Check anything unfamiliar against the documentation.
If a change is mixed together, git add -p lets you stage it piece by piece, so you can commit the part you trust and set the rest aside.
Run the checks you already have
Once the diff reads sensibly, run your normal checks: the test suite, the linter and the type checker, whatever your project uses. Then run the thing yourself. If the change affects a page or an interface, open it and use it, because tests only cover what someone thought to test.
Two habits make this stronger:
- Run the tests before the agent starts, too. If they already fail, you will not be able to tell which failures are new.
- Ask for a test that fails without the fix. A test that passes both with and without the change proves nothing.
Ask the agent to explain
You can use the agent itself as a second reader. Ask it to walk through the change, say why each file was touched, and list anything it is unsure about. Do not treat the answer as proof, because an agent can explain wrong code as confidently as right code. What the question does is show you where to look more closely, and a vague or contradictory explanation is a good sign that part of the change deserves a slower read.
A few prompts that work well:
- "Which files did you change, and why was each one necessary?"
- "What did you not change that I might expect you to?"
- "What could this break, and how would I notice?"
Keep changes small and commit often
The easiest review is the one you never have to do in bulk. Ask the agent to work in small steps and commit after each one, so every commit does one thing. If something goes wrong, you can revert a single commit instead of untangling a large one.
To see everything a branch adds compared with your main branch, use:
git log --oneline main..HEAD
git diff main...HEAD
The first command lists the commits. The second shows the combined change, which is what you would actually be merging.
Know which agent needs you
Review is easier when you know where it is needed. If you run several agents at once, the hard part is often noticing that one has finished and is waiting for you. We covered that in how to see what all your coding agents are doing at once.
Tidepane helps with the bookkeeping side. Each terminal running a coding agent shows live status in the sidebar, so you can see which one needs input, which is working and which is done. Its task log records what Claude Code did, including the files it touched, grouped by day, and you can mark work as verified once you have reviewed it. It supports the habit, but the review itself is still yours.
A routine you can reuse
Put it together and the whole routine fits on a card:
- Check the size:
git statusandgit diff --stat. - Read the diff and question anything you did not ask for.
- Run the tests, the linter and the app itself.
- Ask the agent to explain, and follow up on anything vague.
- Commit in small pieces, then merge only what you understand.
Try it on the next change an agent makes, and adjust the steps to your project. The goal is not to distrust the agent. It is to make sure that when something ships, a person has looked at it.