Vibe coding

When it doesn't work: getting AI to fix a bug without going in circles

Describing a bug to the AI in four lines: what I did, what I expected, what I got and what I see on screen, then asking for the cause before the fix VIBE CODING Describe a bug in four lines What I didthe steps, in orderWhat I expectedthe right resultWhat I gotthe actual resultWhat I seethe exact message, or a screenshotAsk for the cause before the fix

Updated November 28, 2026.

Sooner or later, your tool will do something strange. That’s normal, even for pros. What separates a wasted evening from a ten-minute fix is the way you describe the problem to the AI.

The endless loop trap

The trap: “It doesn’t work.” The AI fixes something. “It still doesn’t work.” It fixes something else. After ten rounds, the code is full of patches, and the original problem is still there.

This loop has two causes: a description that’s too vague, and an AI that fixes what it guesses instead of looking for the cause.

Describe a bug like a pro, in four lines

BUG
What I did: I entered 500, chose "14 pt matte," clicked Calculate.
What I expected: $89.00 (my price grid).
What I got: $0.00.
What else I see: a red message at the top "…" (exact copy, or a screenshot).

These four lines give the AI everything a developer would ask for. Add a screenshot if the tool allows it, and copy error messages word for word.

Ask for the cause before the fix

The sentence that changes everything: “Don’t fix anything yet. First find out why this happens, and explain it to me simply.” If the explanation doesn’t hold up, the fix won’t either. If it’s clear, ask for the fix, then repeat exactly the same scenario.

Three real cases, three lessons

The silent button. A button was supposed to fill in missing data. After the click, almost nothing had changed, and the screen said nothing. There was no way to know what was wrong.

The win: instead of asking “fix it,” I described what I saw: “The button doesn’t show any message, you can’t see what it’s doing.” The next version added a progress bar and a summary. That summary immediately showed the real cause: when an online service refused a request, the tool recorded it as “nothing to find” and gave up until the next day. Once that was fixed, the data fill ran all the way to the end. Lesson: when you can’t see anything, first ask to see.

The inflated home page. A table showed more visits to the home page than it had actually received. While looking for the cause, the AI found that visits to other content were being counted there by mistake, because of the way addresses were shortened.

The win: the fix solved the cause, then recalculated the old data, so the past would be correct too. And while looking at the screen after installing it, I saw that all the new rows had the same name: a second small fix took care of the display. Lesson: after a fix, look at the screen, not just the numbers.

When nothing works: go back

If the problem is still there after three tries, stop. Go back to the last version that worked (that’s why you keep them), then start the request over in a new conversation, with your four-line description. A conversation that runs too long ends up confusing the AI as much as it confuses you.

In this guide: Vibe coding for beginners · previous: The security traps · next: Versions and backups

Frequently asked questions

How do you fix a bug with AI when you don’t know how to code?

To fix a bug with AI without knowing how to code, describe what you did, what you expected, what you got and any messages shown. Ask for the cause first, then the fix, and repeat exactly the same test to check it.

Why does the AI go around in circles on a bug?

The AI goes around in circles on a bug when the description is too vague or when it fixes what it guesses without knowing the cause. A precise description and the instruction “first find out why” break the loop.

What should you do when the AI can’t fix a bug?

When the AI can’t fix a bug after a few tries, go back to the last version that worked and start over in a new conversation, with a precise description of the problem.

Share this article