Skip to content
VibecodeZero

The AI changed parts I didn't ask about. How do I prevent it?

Updated First published

On this page (4)
  1. Symptom
  2. Cause
  3. Prompt to paste
  4. How not to burn credits

Symptom

You asked to change a button's color and suddenly the text on another screen changed, a field disappeared or the layout looks different.

Cause

When the request is vague, like “improve this screen”, the AI decides on its own what improving means. Even with specific requests, it sometimes reorganizes the code around the change and alters things along the way.

The prompt Change one thing without touching the rest follows the safer format: where the change is, what should change and what should stay the same. If the change already happened, Go back to how it was helps you ask for the undo.

Set the limits in the request

Bolt’s help center gives the same advice: be explicit about what should and shouldn’t change, and point to the exact part of the app. Lovable’s debugging guide includes a ready-made instruction from its community that you can add to a request: “Change only what this task requires. … If you notice improvements outside the task, list them separately instead of implementing them.” That last part is useful: the AI still tells you its ideas, but doesn’t apply them without asking.

In Bolt you can also point to the exact part. In the preview, use Select to pick an element, or type @ to tag a file. If you know the code, switch to Code view (the <> icon), highlight it and click Ask Bolt, which links your selection in the prompt box.

Undo the unwanted change

  • Lovable: Undo latest edit under the last response reverses the most recent change, and the undone changes stay in the chat so you can reapply them. For older changes, open History (the toggle in the top bar of the editor, or Project → History in the menu next to the chat input) and click Revert on the version you want.
  • Bolt: click Version history (clock icon) in the top menu, pick the version, click Restore this version, then confirm with Restore version.
  • Replit: its docs suggest a checkpoint when the Agent changed more than expected. Open History in the chat panel and choose Rollback here.

In Lovable and Bolt, going back restores the code, not the data saved in your database. In Replit, the rollback shows what will be restored and asks you to confirm before it applies.

If the AI keeps changing and changing back the same thing, you may be in a loop. See AI agent stuck in a loop and burning credits.

Checked November 23, 2026 in the Lovable docs, the Bolt Help Center and the Replit docs.

Prompt to paste

Copy the text below, replace what’s in brackets and send it in the chat of the tool you’re using.

Paste into the AI
In the last change, besides what I asked for, you also changed [what changed without my asking].
Put that part back the way it was and keep only the change I asked for: [your original request].
From now on, change only what I ask. If you think another part needs to change, ask me first.

How not to burn credits

  • Say where the change is, what should change and what should stay the same, all in the first request. Fixing an unwanted change costs another message.
  • If the unwanted change broke a lot, going back a version in the history is usually quicker than asking the AI to undo it piece by piece. Lovable's docs note that reverting doesn't give back the credits you spent, so the earlier you catch it, the better.
  • Before a big change, like a redesign, save a known-good version. Lovable and Bolt both let you bookmark a version in the history, so it's one click away if things go wrong.
  • Test the whole app quickly after each change, not just the part you asked about. The sooner you notice, the less there is to undo.

How Lovable counts credits, and what the free plan includes: Lovable credits explained.

Questions people ask

Why does the AI change things I didn't ask for?

When the request is vague, the AI decides on its own what "better" means. Even with a specific request, it sometimes reorganizes the code around the change and alters other things along the way. Requests with many parts at once make this more likely.

Does writing "don't change anything else" always work?

It helps a lot, but it isn't a guarantee. That's why it's worth quickly testing the whole app after each change, not just the part you asked about.

How do I undo only the part I didn't want?

Ask the AI to bring back that specific part. Lovable's docs say a revert is all or nothing for the whole project, so for one part they suggest asking in the chat, for example "Bring back the pricing section from before the redesign." The prompt on this page does the same.

How do I go back to the version before the change?

Use the version history. In Lovable, open History (the toggle in the top bar of the editor) and click Revert on the version you want, or use Undo latest edit under the last response. In Bolt, click Version history and then Restore this version. In Replit, open History in the chat panel and choose Rollback here.

Will going back to an earlier version undo my data too?

In Lovable and Bolt, no. Lovable's docs say reverting restores your code only, not the data in your database, and Bolt's say restoring a version doesn't change your database. Records added after that version stay where they are. In Replit, the rollback shows what it will restore before you confirm.

New guides by email. An email when we publish a new guide, error fix or chapter, in plain English. Subscribe