~/VibeHandbook
$39

Chapter 12 · 07

When the AI goes in circles

Sometimes the AI suggests a fix, it doesn't work, it suggests another, that doesn't work either, and you're three "try this instead" loops deep. This is a signal, not a dead end. Do this:

  • Stop and reset the context. Start a fresh message summarizing everything you now know for certain (confirmed by logs), not everything you've tried. A long chat full of failed attempts actively poisons the AI's next answer — it keeps pattern-matching on the dead ends in its own history.
  • State what you've ruled out. "We confirmed user is undefined and the DB query returns null. The query string looks right. So the problem is upstream of the query." This stops the AI from re-suggesting dead ends.
  • Ask it to explain, not fix. "Walk me through, step by step, how user gets its value from the request to line 14." Forcing an explanation often surfaces the gap.
  • Add more logging, not more guesses. When theories run out, evidence is the way forward.
  • Shrink the problem. Ask the AI to help you build the smallest possible snippet that still reproduces the bug. Often the bug becomes obvious once the noise is gone — and if it doesn't reproduce in the small version, you've learned the cause is in what you removed.

Want it offline?

Get the PDF + EPUB + downloadable prompt library + version updates.

$ Get the PDF — $39