Skip to the workspace
Pebellslearn by building
Debugging with an Assistant  ›  Capstone Project

Break the Fix Loop

Debugging 15 minAfter two failed fixes, stop prompting, revert to the last good commit, narrow the bug to one test and gather real evidence before trying again.

vibe coding / Break the Fix Loop

Explore each scene at your own pace.

01 · The rule

The rule

Break the Fix Loop

After settle-up went in, Kitty's balances started going wrong. The first fix made Asha's balance right and Meera's wrong. The second fix made Meera's right and Ravi's wrong. You are about to type "still broken, please fix". That is the fix loop: every lap adds code built on a guess, and the pile of guesses grows.

The rule

Two failed fixes means stop: revert, narrow, gather evidence, then try again.

The assistant will keep producing fixes for as long as you keep asking. Each attempt is a guess about the cause, and failed guesses leave code behind. Breaking the loop takes four moves:

  • Revert. Go back to your last good commit. Reason about one known problem, not three layers of attempted fixes.
  • Narrow. Reduce it to one failing test with the smallest case.
  • Gather evidence. Look at what the code actually does, rather than guessing. The simplest tool is a temporary print of the values at the suspect line:
print("expenses:", expenses)
print("payments:", payments)
print("balances:", balances)
  • Try again, differently. Ask the assistant for causes rather than code: "List three possible causes and how to test each one. Do not change any code yet." Then test them. Or take the wheel and work the case by hand.
Scene 1 of 5
Hover to wake the cannons. Drag to move, or use arrow keys when focused. Press Enter to fire a shot.