DEV Community

Med Marrouchi
Med Marrouchi

Posted on

The AI Code Review Dilemma

AI-generated code is becoming normal in development teams.

But here is the uncomfortable part:

What happens when someone pushes AI-generated code without properly reviewing it?

Now the reviewer has to spend extra time understanding, validating, and fixing code that the author maybe did not fully understand in the first place.

And that creates a strange dilemma:

Why should I invest serious review time into code that the author did not take the time to review themselves?

It gets even more confusing when code reviews also become AI-generated.

Someone opens a PR.
Someone else gives the diff to an AI coding agent.
Then they copy/paste the AI comments as the review.

At that point, are we really reviewing code?
Or are we just forwarding AI output from one side to another?

I’m not against AI in development. Far from it.

AI can help us write faster, spot bugs, generate tests, explain legacy code, and improve productivity.

But AI should not remove ownership.

If you use AI to generate code, you still own that code.

You should understand it.
You should test it.
You should clean it up.
You should be able to explain why it works.

Same for AI-assisted reviews.

Using AI to help review a PR is useful. But blindly copy/pasting comments without understanding them does not really improve the team. It just moves the responsibility somewhere else.

Maybe the real rule should be simple:

Use AI as an assistant, not as an excuse.

Because in the end, the team does not maintain “AI-generated code”.

The team maintains code.

And when it breaks in production, nobody will care which model wrote it.

How do you deal with this in your team?

Top comments (0)