When Claude Code Makes a Fix Worse, Stop and Revert

In a session, one was handed to Claude Code. Its first fix caused two more tests to fail, and each repair broke something else. After an hour, nine files had changed, yet the original test still failed.

Because the changes were approved without being read while was elsewhere, the altered files were no longer easy to understand. Opus repeatedly offered confident diagnoses, but a supposed turned out to be wrong. Its endless supply of plausible next steps made the situation dangerous: each change looked close to working, so the failed path continued for as long as two hours.

The useful skill was not writing smarter instructions but recognizing when to stop. If the diff grows after every round or changes are being approved unread, return to the last good commit and step away; in this experience, nine times out of ten, ten quiet minutes away from the keyboard revealed the answer to the original problem.

Key points

  • Stop when one small failure keeps spreading into more files or failed tests.
  • Treat a growing diff as a warning that the approach may be wrong.
  • Do not approve changes that you have not read and understood.
  • Return to the last good commit and take a short break before trying again.
  • A confident AI diagnosis is not proof that it found the real cause.
Read original