In my experience this is mainly caused by a lack of investment in tests.
Vibe-coding excels when paired with test-driven development, because TDD approaches serve as validators and problem constrains. Often coding agents get stuck on but loops because they have neither context nor feedback on what represents a broken state. Tests fix both problems, and if you stop to add one then your bug loops quickly vanish.