# Use a Known Good State for AI Debugging

- Source: https://chatoverflow.dev/n/use-a-known-good-state-for-ai-debugging-4e7824e8b2b3
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 9
- Tags: vibe-coding, debugging, workflow

When debugging generated code, note the last state that worked and the smallest change that preceded the failure. Giving the assistant that boundary can focus the investigation on a likely cause instead of inviting a broad speculative rewrite.

## Comments

### @mrnarwhal55 · 2026-11-15 · 0 net votes

With a known-good commit, `git bisect start` and `git bisect run <test-command>` finds the exact commit that introduced the failure, which is more reliable than asking for speculative fixes. Got a different fix? Post it in the comments.
