Describing a Bug So Your AI Agent Can Actually Fix It
A well-formed bug report, written for someone with no IDE or debugger, only a browser console and a builder's own error toast to work with. Symptom, not diagnosis.
Quick answer
A bug report your AI agent can actually act on describes the symptom, not your guess at the cause: the exact error text, copied rather than paraphrased; where it appeared (a browser console, a build log, or a backend function log all point at different layers of your app); what you did right before it happened; and what you expected instead. "The API key must be wrong" sends an agent looking in exactly the wrong place if the real cause is something else. "Submitting the form does nothing and the console shows a 403" describes what actually happened and lets the agent diagnose the real cause itself, usually faster than you could from the outside.
Tools for this build
The one-sentence version: symptom, not diagnosis
The single most common way a well-intentioned bug report still fails is describing what you think is wrong instead of what you're actually seeing. It feels helpful to offer a theory, "I think the database connection dropped," but a wrong theory actively misdirects an AI agent's attention toward the wrong place, which is worse than offering no theory at all. The agent is almost always better positioned than you are to diagnose the real cause, once it has the actual symptom in front of it rather than your interpretation of it.
A vague bug report vs. an actionable one
A vague report
"It doesn't work" / "I think the key is wrong":
A theory, not a symptom. Sends the agent guessing, possibly in the wrong direction
An actionable report
The exact error, where it appeared, what you did:
A real symptom the agent can diagnose from directly
AI Build · aibuild.co.za
The four things a fixable bug report always has
Four specific pieces of information cover almost every real bug worth reporting. The exact error text, copied character-for-character, never paraphrased, since an error message is frequently a precise identifier, an exact code or wording, that immediately narrows down the real cause. Where it appeared: a browser console, a deploy build log, or a backend function log all point at genuinely different layers of your app, covered in more depth below. What you did right before it happened, the specific action, not a general area of the app. And what you expected versus what actually happened, stated as two separate, plain sentences rather than folded into one confused description.
Where you'll actually find the error text on a build with no IDE
Without a traditional developer's debugger or terminal, three places cover almost every error you'll run into. Your browser's own developer tools (press F12, or right-click and choose Inspect, then the Console tab) shows frontend errors exactly as your browser sees them. Your platform's own build or deploy log, visible in Lovable, Base44 or Bolt.new's own interface, shows errors from the step that compiles your project before it goes live, covered in this site's own guide to what deployment actually means. A backend function's own log, where Supabase Edge Functions or Base44's backend runtime record what happened server-side, shows errors from code that never reaches your browser at all. Naming which of the three you're reading, not just pasting the text, is itself part of a well-formed report.
Why "I think the API key is wrong" is worse than no theory at all
Offering a wrong diagnosis doesn't just fail to help, it actively costs time: an AI agent given a specific but incorrect theory will often investigate that theory first, checking and ruling out the API key before it gets to the actual cause, a permission issue, a mismatched field name, something else entirely. This site's own Fixes silo exists specifically because real errors on an AI-built site cluster into a small number of actual categories, not the theory a worried builder guesses at under pressure. A precisely described symptom, handed over without a guess attached, reaches the real category faster than a plausible-sounding wrong one ever does.
What a genuinely well-formed bug report looks like, worked example
Our guide to why an AI-built app stops working is built around this same discipline: it starts from the exact error, a 401, a 403 or a 500, and the layer it came from, not a general description of "the backend seems broken." That same specificity is what turns a real bug you're facing into something your own AI agent can act on rather than guess at.
Not every bug reproduces the same way twice
A bug that happens every single time usually points at something wrong in the logic itself, straightforward to describe and fix. A bug that only happens sometimes is worth naming as such explicitly, since it often points at a race condition or a timing-dependent state rather than a simple logic error, the same category this site's own guide to why a vibe-coded app isn't production-ready by default covers with a real worked race-condition example. Saying "this happens every time" versus "this happened once, I haven't reproduced it since" changes what an AI agent should even look for first.
Where to go next
- The same discipline applied to a feature request instead of a bug: Writing Prompts AI Agents Understand.
- Which category a real error actually falls into: Errors & Troubleshooting hub.
- What the common error codes mean, before you describe one: Why Is My AI-Built App Not Working?
- A long chat where your AI keeps forgetting the details you gave it: Why Your AI Forgets or Stops.
Not affiliated with the platforms we write about
AI Build South Africa is an independent resource. We're not endorsed by, or an official partner of, PayFast, Yoco, Peach Payments, Ozow, Meta, Lovable, Base44, Bolt.new or Anthropic. We do participate in affiliate and referral programmes with some of these providers, including Base44. See our Disclaimer for the full disclosure and our Terms of Service for the wider terms.
Frequently asked questions
What if I don't understand the error message myself?
That's fine, and expected. You don't need to understand what an error means to report it well, you just need to copy it exactly, along with where it appeared and what you were doing when it happened. Understanding the error is the AI agent's job; your job is handing it an accurate symptom to work from, not a correct diagnosis.
Does it matter whether an error came from the browser console, a build log or a backend log?
Yes, significantly. The same-sounding error from these three places points at three different layers of your app, and naming which one you're reading immediately narrows where the real problem lives. This site's own Errors and Troubleshooting hub maps error categories to their actual cause for exactly this reason, rather than treating every error the same way.
Should I paste the whole error or just summarize it?
Paste it, don't summarize it. An error message is often a precise identifier, sometimes a specific code or exact wording that tells an experienced diagnosis exactly what's happening. Paraphrasing it ("something about a 403") throws away the specific detail that would have let your AI agent recognise the exact failure instead of guessing at one that sounds similar.
What if the bug only happens sometimes, not every time?
Say so explicitly, since it changes the likely cause. A bug that happens every single time usually points at something wrong in the logic itself. A bug that happens only sometimes often points at a race condition, a timing issue, or a state that depends on something outside a single request, worth naming directly rather than letting your AI agent assume the more common, always-reproducible kind of bug.
Is it worth telling the AI what I already tried?
Yes. Naming what you already tried and confirming it didn't fix the problem saves your AI agent from proposing the same fix again, and can itself be a useful clue: a fix that should have worked but didn't often means the actual cause sits somewhere other than where it looked.
What's the difference between a good bug report and a good feature-request prompt?
A feature request describes what you want built and gets structured with the where/what/what-shouldn't-change pattern this site's own guide to writing prompts covers. A bug report describes what's already happening that shouldn't be, and gets structured around the actual symptom: the exact error, where it appeared, and what you expected instead. Different starting point, same underlying discipline of supplying specifics instead of an impression.
Related reading
- Giving Your AI Builder Project Context: the discipline that prevents a bug report from being the only context your agent has.
- Iterating on an AI-Built App Without Breaking Working Code: the scoped-request discipline this page's bug reports feed into.
- Why a Vibe-Coded App Isn't Production-Ready Yet: a real worked race-condition bug, the kind that doesn't reproduce the same way twice.