Skip to contentTalk to us
Prompting

Prompts that fix bugs: how to report a problem to an AI agent

A ready template for reporting bugs to an AI agent: where, steps to reproduce, expected vs actual, evidence. Plus Gulf examples and what to do when fixes loop.

Fanann Team8 min read
WhatsApp
Quick answer

To report a bug to an AI agent effectively, write five things: where it happened (page, role, device), the steps to reproduce it in order, what you expected, what actually happened including the exact error text, and what must not change. Ask the agent to explain the cause before editing, then to test the fix and the nearby features. If two attempts fail, stop and roll back or split the problem.

People look for this as
  • how to report a bug to ai
  • prompt to fix a bug in my app
  • ai keeps failing to fix the bug
  • how to fix bugs in an ai built app
  • debugging with ai prompts

How do you report a problem so the agent fixes it the first time?

To report a problem to an AI agent so it fixes it the first time, write a five-part bug report: where, how to reproduce it, what you expected, what happened, and what must not change. The agent sees the code but not your screen. It does not know you were testing as a staff user on an iPhone with the Arabic interface. Every detail you add removes a guess.

The Fanann Agent tests pages and fixes many bugs on its own while building, but some problems only appear when you use the app like a real customer: a business rule understood differently from what you meant, or a rare case nobody tried. That is your part, and the quality of your report sets the speed of the fix.

A bug described precisely is half fixed.

The bug report template: copy and fill it in

Use this template for one problem at a time. Do not bundle three bugs in one message; each deserves its own report and its own test.

Bug report template

I have a problem with [page or feature]. Context: logged in as [customer/staff/manager], on [phone/desktop, browser], interface in [Arabic/English]. Steps to reproduce: 1. [first step] 2. [second step] 3. [third step] Expected: [what should have happened]. Actual: [exactly what happened]. Error text: '[copy it exactly]'. It happens [always/sometimes/once]. Before editing: briefly explain the likely cause. After fixing: rerun the same steps and test [nearby features] to confirm they still work. Do not change [the design/other pages/payment logic].

Try it in Fanann

Bug or change request?

Before writing the report, ask yourself: did I ask for this behavior in the first place? If the rule was in your prompt and is not applied, it is a bug; use the template above. If you have discovered a new rule you never mentioned, such as deposits being non-refundable during Eid, it is a change request. Write it as a clear new feature, 'Add a rule that…', not as a complaint that 'booking has a problem'. The agent then adds the missing logic instead of hunting for a fault that does not exist.

Weak reports vs strong reports: realistic examples

Weak report
  • 'Payment doesn't work'
  • 'The page is broken in Arabic'
  • 'The code never arrives'
  • 'The total is wrong'
Strong report
  • 'After paying with mada in test mode, I land back on the cart instead of the thank-you page, and the order stays unpaid'
  • 'On the Arabic product page, the back arrow points left and the price shows reversed before the currency'
  • 'The OTP arrives for numbers starting 05 but not when the customer types +966'
  • 'Cart with two items at SAR 100: expected VAT 30 and total 230; it shows VAT of 15 only'

Strong reports need no technical terms. They contain numbers, a specific input format and a comparison of expected and actual. That is all the agent needs to know where to look.

Problem typeThe key detail to add
PaymentsMethod, amount, where the journey stopped, and the order status afterwards
Sign-inPhone number format, whether the code arrived, and the message shown
Design and RTLLanguage, screen size, and a screenshot
Calculations and pricesA numeric example: inputs, expected result and shown result
PermissionsThe role you used, and what you saw that you should not
NotificationsThe expected event, the time, and the channel (WhatsApp, SMS, email)

How do you gather evidence if you are not a developer?

  1. 1
    Reproduce it again

    If it repeats with the same steps, it is easy to fix. If not, say so and give the approximate time.

  2. 2
    Change one variable

    Try the other language, another role or another device. 'Only happens in Arabic' is gold.

  3. 3
    Copy the text, do not summarize it

    Paste the error message as shown, even if it is in English and means nothing to you.

  4. 4
    Take a screenshot

    Especially for design and direction issues; one image replaces a paragraph.

  5. 5
    Name the test data

    The order number, product name or test account you used, so the agent can find the same case.

What if the fix does not work?

Sometimes a fix goes in circles: the agent fixes one thing and another breaks, or the same bug returns in a new form. The practical rule: after two failed attempts, change approach instead of repeating 'still not fixed'.

  1. Ask for diagnosis without edits: 'Do not change anything yet. Explain step by step how this feature works, where it could fail, and suggest two ways to fix it.'
  2. Split the problem: instead of 'the booking page is full of problems', start with the smallest part: 'focus only on showing available slots for Friday'.
  3. Roll back to a good version: if the problem started after a specific change, return to the version before it and request the change again more clearly. Fanann offers instant rollback to an earlier version.
  4. Restart from a summary: in very long chats, context can get lost. Write a short summary of what the feature must do and start from it.

Why context gets lost and how to handle it: why AI forgets in long projects. For the broader guide for non-developers, see how to fix bugs in an AI-built app.

Stop bugs coming back: test after every fix

The real danger of a fix is breaking something else unnoticed. Keep a short list of your app's core scenarios and ask for them to be retested after every important fix:

  • New customer sign-up with phone number, and login.
  • A full order or booking with each payment method.
  • Cancellation and refund.
  • Staff and manager login, with permissions checked.
  • Main pages on mobile in Arabic and English.

If real customers already use your app, try big fixes in a test environment first; see staging vs production. For a full pre-launch quality list, read can you trust AI-generated code?.

Ready prompts for common Gulf app bugs

These bugs recur in apps serving customers in Saudi Arabia and the UAE because they involve local calendars, digits, tax and time zones. Copy the one closest to your problem and adjust the details:

  • Hijri date: 'The Hijri date on the booking page is one day off the official Saudi calendar. Tell me which calculation you use and align it with the Umm al-Qura calendar.'
  • Phone numbers: 'If a customer types their number in Arabic-Indic digits, with spaces, or as +966, normalize it to one format before saving and sending the code.'
  • VAT: 'On the invoice, calculate VAT on the order total rather than rounding per item, and show the pre-tax amount, VAT and total clearly. Test with 3 items at fractional prices.'
  • After payment: 'If the customer closes the page right after paying, the order stays unpaid. Make sure payment confirmation is recorded from the gateway notification, not only from the thank-you page.'
  • Direction: 'On the Arabic checkout page the email field types from the right. Make email and card fields always left-to-right.'
  • WhatsApp: 'The WhatsApp confirmation does not arrive for orders placed after midnight. Check the time zone in use (Riyadh time).'

Key takeaways

  • A good report covers place, steps to reproduce, expected, actual and limits on changes.
  • Copy the error message exactly, and attach a screenshot when you can.
  • Ask for a diagnosis first, then the fix, then tests of what is around it.
  • After two failed attempts, change approach: roll back, split the problem, or restart from a summary.
  • Keep a list of test scenarios to rerun after every fix.

Frequently asked questions

How do I explain a bug to AI?
Give the page, role and device, the steps to reproduce in order, what you expected, what happened with the exact error text, and what must not change. Ask for the cause before any edit.
Why does the AI keep failing to fix my bug?
Usually the description is not enough to locate the problem, or the chat got long and lost context. Ask for diagnosis without edits, split the problem, or roll back and start from a clear summary.
Should I send several bugs in one message?
Better not. One bug per message means a precise fix and a clear test, and makes it easy to see which change caused which result.
Do I need to understand code to fix bugs?
No. You need to describe what you saw precisely and test carefully. The agent reads and edits the code; your role is to define the problem and verify the fix.
When should I bring in a developer?
If fixes keep failing on a sensitive feature like payments or permissions despite splitting and rolling back, or before a big launch handling sensitive data. Owning your code and exporting it to GitHub makes it easy for any developer to help.

Ask your AI assistant about this

Copy this prompt into the AI assistant you use, then add the details of your own case.

I am reading this guide: “Prompts that fix bugs: how to report a problem to an AI agent” https://fanann.com/en/blog/prompts-to-fix-bugs/ My question: how to report a bug to ai Use that page as a source and explain the answer step by step for my situation, tell me what to check before I start, and cite the page link.

Terms in this article

Your idea deserves to see the light.

Describe it in Arabic or English and Fanann builds, tests and ships it — no coding knowledge needed. Start free, no credit card.