Posts

Who Reviews the Code My AI Agents Write?

These days a big chunk of my code is written with AI. Most of the time I have several agents running in parallel: one fixing a deploy script, one cleaning up a Helm chart, another building a small service. They’re fast, but that speed created a new problem. The bottleneck isn’t writing code anymore. It’s reviewing it.

Honestly, reading that much code is boring. But I can’t skip it. I still need to know the logic makes sense, nothing that used to work is broken, and no edge case slipped through. That doesn’t mean I have to catch every obvious mistake myself, though. I let an agent do a first pass to clear out the surface-level stuff, so I can spend my attention where it actually matters.

The easy option is asking the same session that wrote the code to review it. That works a little, but there’s a catch: shared context. After an hour of working with an agent on a feature, going back and forth, making decisions and fixing things, that session is full of the assumptions behind the code. Ask it to review, and it mostly defends its earlier choices instead of looking for what it missed. It’s a bit like approving your own PR.

So I always review in a fresh session with no history. It gets the codebase and the changes, and looks at them cold. When I can, I also switch models. If Claude wrote it, Codex reviews it, and vice versa. Every model has its own blind spots, and a second one often catches what the first walked right past.

This is roughly the prompt I use:

Review this branch against main. Focus only on issues that should block the merge.

Look for bugs, regressions, incorrect assumptions, missing edge cases, and changes that could break existing functionality.

For each issue, include the file and line number, explain why it's a problem, and provide a way to reproduce or verify it.

Don't report style preferences, naming suggestions, or speculative issues. If you couldn't verify something, say so and explain what you checked.

I limit it to merge-blocking issues on purpose. Otherwise it comes back with a long list of naming and style nitpicks. Asking for reproduction steps also keeps it from reporting problems that don’t exist, because it has to show they’re real.

When the review is done, I check the findings myself and send the real ones back to the original agent to fix. For sensitive changes, especially anything touching production or infrastructure, I have the reviewer check the fixes once more before I look at the diff. And whenever I catch myself giving the same feedback again and again, I move it into CLAUDE.md, turn it into a skill, or enforce it with a lint rule, so I stop catching it by hand.

The way I see it, AI writes the code fast, but I’m still the one responsible for it. My job is making sure my time goes to the parts that actually matter.

Leave a comment

Your email address will not be published. Required fields are marked *.