The hidden trap of vibe coding: When AI fixes one thing and quietly breaks another
I was using Cursor recently to refactor a component for a client project. The initial bug fix worked instantly, so I skimmed through the diff, trusted the output, and pushed it straight into testing.
Everything looked fine on the surface until I realized the AI had silently refactored an underlying state logic that broke a completely unrelated edge case. It took me twice as long to trace and undo that hidden change than it would have to write the fix manually from scratch.
I’m definitely not against vibe coding or AI tools they speed up the workflow tremendously. But this experience taught me a valuable lesson: never accept a diff without carefully reviewing how it impacts state and global variables.
Now, whenever I prompt an AI assistant for a quick fix, I explicitly ask it to only touch the targeted lines and explain any unintended side effects before applying changes.
How do you handle code reviews when vibe coding? Do you inspect every line of the diff, or do you rely on automated tests to catch quiet regressions? Would love to hear your approach!
Replies
have an evals agent
Both. Review every changed line, especially shared state, and make the regression test fail on the old code before trusting it. Then run the tests for the other components using that state.