The AI Fixed My Bug but Created Two New Ones

by•

I recently asked an AI coding assistant to fix a small issue in my project. It found the problem quickly and suggested a solution that looked perfectly reasonable.

But after applying the fix, two unrelated parts of the application stopped working.

I spent more time understanding the side effects than I would have spent fixing the original bug myself.

AI coding is getting impressive, but I still feel we need to be careful about trusting every suggested change.

How do you review AI generated code before accepting it?

3 views

Add a comment

Replies

Best

The review that catches the most for me is not reading the fix, it is reading the diff for things nobody asked for. Side effects usually live in a file the fix had no reason to touch. A concrete one from my repo, where several agent sessions work in parallel: a bare commit picked up a rename and a deletion another session had staged, and the main branch would not build until the next commit put them back. Since then every commit names its files explicitly. Plus a simple rule: if a change could plausibly not compile, run the analyzer, and if a feature lands, actually run it before calling it done.