Building your first version
What should I do when AI keeps failing to fix the same bug?
Lumos · Updated
Pause further edits and get a repeatable description of the failure. Tell the AI where you started, what you did, what you expected, and what actually happened. Ask it to investigate a cause before trying another change.
Include the exact error message if there is one. A screenshot can show a layout problem; an application's error log can show a failed request. Remove private data and secret values before sharing either.
Give the fix a clear check
Using the handbook's hypothetical feedback app, a report could say:
I opened a new client request, wrote a response, and pressed Submit. The page said it was saved. After refreshing, the response was missing. I expected it to remain. Find where saving fails, explain the evidence, and make the smallest relevant fix.
Ask the AI what information would distinguish its suspected cause from other explanations. If it needs logs, have it explain where to find them. MDN's JavaScript debugging guide explains how browser tools expose errors and help investigate running code.
Repeat the same steps after the fix, then check nearby behaviour. Keep a note of failed attempts so the next investigation doesn't repeat them. If earlier changes made things worse, preserve the current work and consider returning to a known working version.
When you can't reproduce the failure or assess the proposed repair, ask a developer for help with that specific problem.
In the Builders Handbook
Test it, fix it, and keep going covers bug reports, checking fixes, and keeping a working version within reach.