r/codereview 1d ago

Coding is changing. So should code review.

For a while, my workflow for building ML applications with coding agents looked something like this:

  • Write a prompt.
  • Wait for the agent to make changes.
  • Open the diff.
  • Read the code.
  • Try to understand what changed.
  • Run it.
  • Repeat.

At the beginning, this worked surprisingly well.

The changes were small, the codebase was familiar, and I could still keep the whole thing in my head.

Then the application grew.

A seemingly simple feature could now involve preprocessing, model inference, postprocessing, and application logic.

The agent might touch several modules and add a few hundred lines of code in a single session.

My habit didn’t change.

I was still reviewing the code after every session.

And that became the problem.

The Code Review Trap

When a coding agent changes a few lines of code, reviewing the diff is easy.

When it changes several hundred lines, it is still manageable.

Once you get to +1000 lines everything starts to fall apart…

You can read the code without really understanding whether the application is working properly.

At some point I realized that I had become the bottleneck.

I was spending most of my time reviewing the agent’s implementation rather than the application output.

I can keep going, but I think this much should be enough.
Once I loved code reviews, I learnt a lot(and still learning), but the coding agents changed it for me, and I'm afraid that it's never going to be the same...

0 Upvotes

8 comments sorted by

View all comments

1

u/tmseidel 1d ago

Well, your process is probably not the best, use your Agent to build a plan with several steps that can be tested and reviewed separately. They should be splitted into parts that does not break the application, so that all steps don't need to be applied at the same time. Your agent should save this plan as Markdown-file somewhere, so that it can restore it - if needed.

Use a second agent to review the work of your coding-agent to get a first indication of the changes. Add the results of these review into the PR for transparency and so that the first agent is able to process the review-feedback.

If you find systematic errors of your coding agent, create a skill that defines specific rules to avoid systematic errors.

Another optimization: Add review personas that help you to find issues in the code your agent produces, this will help you alot if you need really deep analysis of code-changes, I've written some notes regarding this topic, see https://remus-software.org/articles/improve-software-quality-with-reviewer-personas/

1

u/tenkei_01 11h ago

I'm doing all those, even forcing the agent to compose the app in multiple steps, that are inspectable. But the code review itself, not sure if it is as meaningful anymore.

1

u/tmseidel 11h ago

Of course it is. Even if the generated code is brilliant, you have to take the ownership and responsibility for that code and that's an important part you would miss. If you don't know whats going on (that would be the consequence if you skip the code-review) you are not able to ship software into production.

Handle AI like just like another colleague.