Slogging through AI code all day? How to review it without reading every line

A few weeks ago someone on Hacker News asked whether anybody is actually producing good code with coding agents.
Dr. Marcel Tella Amo
Claude Code & Cursor in real codebases | Test-first AI coding | PhD, ex-PTC Vuforia
Get in touch

The post said: "Now I spend nearly the whole workday slogging through convoluted code riddled with footguns." The poster added: "This is a genuine problem that I hear from senior engineers. I'm looking for a solution".

To be frank, arghh... I recognise that feeling. Most of the answers in the thread were reasonable, things like keeping changes small, writing a spec first and using a second model to review, but I think there is something underneath them that is easy to miss, and once I saw it, the way I review agent output changed quite a lot.

The decision moved... and the review did not

When someone writes a pull request, most of the thinking happens while they write it. By the time it gets to you, the diff is a pretty honest record of their decisions, so reading the diff is a good way to review what they decided.

With an agent, most of the decisions happen before the code exists. They happen in the prompt, in the plan the agent proposed, and in whatever it assumed when the prompt was vague. One commenter in a related thread put it well: the design discussion "often happened inside the prompt instead of the PR". So when you sit down with a 900-line diff, basically you wanna die. The feeling is horrendous. Yyou are trying to reverse-engineer decisions from their output, which is slower and much more exhausting than reviewing the decisions directly!

I think that is why it feels like a punch in the face, because you are doing the review at the most expensive point in the whole process.

Review the definition of done before the agent starts

The thing that helped me most is pretty boring. Before an agent starts on anything important, I write down what "done" means as a short list of checks. Each check can be answered yes or no by someone who did not do the work. It looks something like this, rather than a paragraph about intent:

Done when, for example:

(a) the existing test suite passes (independent agents to build tests and code them. Tests always designed by a human)

(b) the new endpoint returns 404, not 500, for an unknown id

(c) no change to the database schema

(d) the migration runs twice without error.

Then I review that list, and if it is someone else's task, I ask them to show it to me before any code is generated. It takes a couple of minutes to read, and it is where most of the useful disagreement happens. "Wait, are we allowed to touch the schema?" is a much cheaper conversation at this point than... say at line 640 of the diff.

The list also changes what the agent produces, because it now has something concrete to aim at. At PTC, where I spent over six years on Vuforia Engine working on software verification, the SDK test suite and benchmarking, I learned pretty quickly that the benchmark you design affects what engineers optimise for. If you get the measurement wrong, a team can spend months improving the wrong thing. In my own work with agents I have found the same thing, and it shows up within one session rather than over months. Whatever you write as the check is what they will work towards.

Ask for evidence, but not for a summary

Agents are very good at telling you that the work is finished. "All tests pass, the feature is complete" is a sentence they will produce whether or not it is true, and after a long day it is tempting to believe it.

I like to think about how my supervisors in my career knew that what I did was OK. If you think through, they ask for evidence. What tells me tht that is well done? It is usually a few small set of data that makes that a checkpoint.

In my own work I treat that kind of statement as worth nothing. What counts is the command that was run and its exit code. So the pull request, or the end of the agent session, has to include the actual output: which test command, how many passed, how many failed. If a claim in the summary has no output behind it, I assume it did not happen.

There is one more piece of evidence I ask for, and in my experience it catches a lot. For any new test, I want to see it fail before the fix and pass after it, because until it has failed once, I have no evidence it can detect anything. I keep running into agent-written tests that pass against both the old code and the new code, which means they are checking nothing useful. Asking to see the red first removes most of those. I go into this in more detail in a separate article on agent-written tests.

Review in a fresh context - Independency 

This is a pretty common mistake, I made it too. I stopped asking the session that wrote the code to judge it. It carries every assumption it made along the way, and it tends to confirm them. In my own sessions, if I ask the same session "is this correct?", it usually finds reasons why it is.

So my review step happens in a separate context, even better if it can be a different model, that has never seen the conversation. A new session, pointed at the files on disk and the checklist from the start, with one job: go through the checks one by one and say which ones fail and why. It does not get the original prompt or the agent's explanation of what it did, only the artifact and the definition of done.

This does not replace a human. What it does is change what the human reads. Instead of starting at line 1, I start with a short list of checks that probably fail, and I read the code around those. Sometimes that is all the reading the change needs. Other times it tells me early that the whole approach is off, and I send it back instead of reading the remaining 800 lines.

Read by risk, not by line count

Even with all of that, a person still has to read some of the code. The question is which part.

My rule of thumb is to read closely wherever being wrong is expensive or hard to undo: anything that writes or deletes data, touches authentication or permissions, moves money, changes a public interface, or runs on every request. I also read the tests themselves, because a weak test there will quietly approve everything that follows. The rest, the glue code, the formatting, the obvious plumbing, I mostly leave to the checks and skim.

But you might think.. Huh, that sounds like lowering the bar. I think it is the opposite. When you try to read everything with the same attention, the attention runs out somewhere around the middle of the diff, and nobody knows which part got the tired version of you. A commenter in the same Hacker News thread said it plainly as the following:

if you are human-reviewing all the output of AI, you are going to hit the human comprehension bottleneck. Choosing where to spend attention on purpose is better than letting fatigue choose for you.

Check your checks

One last thing, which I skipped myself at first. Once you have checks, linters and automated reviewers in place, it is easy to assume they are working because they produce findings, and I only found out how wrong that can be when I measured one.

I had built an automated check for the copy on my website, and when I measured it, it had raised two findings on my homepage, and both were wrong. They flagged lines I actually think are among the best on the page. The check looked busy and responsible, and it was mostly noise.

So now any check I add has to show, on real examples, that it tells good work from bad. If it cannot, it comes out. In my experience the review process got better more often by deleting checks than by adding them. An AI reviewer that leaves fifteen comments on every pull request is not more careful than one that leaves two. It is usually just louder, and people learn to ignore it, which is worse than having nothing.

What this looks like in a normal week

Put together, the routine is fairly simple:

  1. Before the agent starts, write "done" your list of yes/no checks, and agree on them. (Human Judgment)
  2. Keep the task small enough that the checks fit on one screen. 
  3. The output must include the test command and its result, and every new test must be shown failing first.
  4. A fresh session, with only the files and the checklist, reports which checks fail.
  5. A person reads the risky parts and the tests, and skims the rest.
  6. Every few weeks, look at which checks actually caught something, and remove the ones that did not.

None of this needs a new tool. It is mostly about moving the review to the point where decisions are made, and refusing to accept "it's done" without evidence.

It will probably feel slower for the first week or two, because writing the checks is real work. What you get back is that less of your day goes into diffs, and you know why you trust the things you merge.

If you want help setting this up

On MentorCruise I help senior engineers and tech leads with exactly this: bringing Claude Code or Cursor into a real codebase in a way that produces work you can review and trust. Bring one pull request that cost you an afternoon this week. In the first call we write its definition of done together and set up a fresh-context review step on your own repository, so you leave with a workflow you can keep using without me.

You can find me here: Dr. Marcel Tella Amo on MentorCruise.

Image

Ready to find the right
mentor for your goals?

Find out if MentorCruise is a good fit for you – fast, free, and no pressure.

Tell us about your goals

See how mentorship compares to other options

Preview your first month