StoicBuilder

HandbookIV the PraetoriumRolling back safely

IVthe Praetorium, Direct the agent

Rolling back safely

1 min readUpdated 28 November

In plain words

Rolling back means returning your app to an earlier version that worked, using the tool's history or Git, instead of asking the agent to undo from memory.

Where you see it

Version history in Lovable and Bolt, checkpoints in Replit, "Restore checkpoint" in Cursor, and /rewind in Claude Code. All of them restore your code; most do not undo changes already made to your database.

Your promptagent
Before: undo your last change, it broke everything After: I've restored the 3:40 pm version from history.List any database changes you made after that time,so I can decide whether to undo them too.
Let the tool restore the code. Ask the agent only about what the tool can't see.

What goes wrong

  1. Asking the agent to undo its own work

    It rebuilds the old version from memory and may miss a file or leave a half-change behind. The history button restores the exact earlier state.

    undo everything you did in the last hour
  2. Restoring the code but not the database

    If the broken change added a column or deleted rows, rolling back the code won't put them back. Ask what changed in the database before you restore.

  3. Having no good version to go back to

    If you never saved a version while things worked, there's nothing clean to return to. Commit, or note the version, each time a feature works.

What to tell your agent

Copy this into Lovable, Bolt, Cursor or any agent
Commit the current working state with a clear message before you change anything. If this change touches the database, tell me what a code rollback would not undo.

Quick check

Sign in to earn +10 XP for it

You restore yesterday's version in Lovable, but the app still errors about a missing column. Why?

Got a prompt that touches rolling back safely?

Paste it. You get a better prompt first, then the cards that explain it.

Check your own prompt

Free, no sign-up.