Features › Advanced Features
Rollback Feature
Undo changes and return to a previous working version
What is Rollback?
Rollback lets you turn back time on your project. If something breaks or the agent goes in the wrong direction, you can go back to any earlier point in your conversation and start fresh from there.
Think of it like:
- A save point in a video game
- The undo button, but for your entire project
- A checkpoint you can return to
Here's how it looks in Emergent:
When Should You Use Rollback?
Perfect Situations for Rollback
Something Broke
The app was working, then the agent made changes and now it's broken.
**Solution:** Roll back to when it worked!
Wrong Direction
The agent misunderstood and built something different than what you wanted.
**Solution:** Roll back and explain better!
Stuck in Loop
The agent keeps trying the same fixes that don't work.
**Solution:** Roll back to last stable point!
Want Different Approach
You realized there's a better way to build this feature.
**Solution:** Roll back and try new approach!
How to Use Rollback
Find the Rollback Button
Desktop: Look for the rollback button in the chat interface
Mobile: Tap the clock icon
Choose Your Checkpoint
Scroll through your conversation history
Click on the message where everything was still working
Tip: Look for messages like:
- "Everything works!"
- "Feature complete"
- Before problems started
Pick Rollback Type
You'll see two options:
Option 1: "Erase all messages and generated code"
- Goes back completely
- Code returns to that point
- Conversation resets
- Choose this if: Code is broken
Option 2: "Erase messages only"
- Keeps the current code
- Only removes conversation history
- Choose this if: Just want to restart chat
Confirm
Click Confirm
<Danger> This cannot be undone! </Danger>Start Fresh
You're now back at that point
Continue from here with a clearer prompt
Example: When to Roll Back
Scenario: Broken Payment Feature
You: "Add a checkout page with Stripe"
Agent: Builds checkout page - works great!
You: "Add a discount code field"
Agent: Adds discount field - still works!
You: "Make the button bigger and add animations"
Agent: Now checkout is completely broken!
You: "Why isn't it working?"
Agent: Tries fix #1... doesn't work
Agent: Tries fix #2... still broken
Agent: Tries fix #3... making it worse
Time to roll back!
- Click rollback button
- Go back to: "Add a discount code field" (when it worked)
- Choose "Erase all messages and generated code"
- Now try again with better instructions:
You: "Make the checkout button bigger - but test it carefully
and make sure payments still work before finishing."
Two Types of Rollback
Complete Rollback (Recommended)
"Erase all messages and generated code"
Info
What happens:
- Code goes back to that point
- Conversation resets to that point
- Everything returns to that state
Best for: When code is broken or you want a clean restart
Example:
Working app at message #15
↓
Made changes, now broken at message #23
↓
Roll back to message #15
↓
Back to working app!
Message-Only Rollback
"Erase messages only"
Info
What happens:
- Conversation history is cleared
- Code stays as-is (current version)
Best for: When code is fine but conversation is cluttered
Example:
Long conversation with many back-and-forth messages
Code is actually working fine
Just want to clean up chat and start fresh
Roll back messages only
Code unchanged, conversation clean
## Important Things to Know
### You Cannot Undo Rollback
Warning
Once you roll back, you cannot undo it!
You'll lose all work done after that point.
Before rolling back:
- Are you sure you want to go back?
- Could the agent fix it with better instructions instead?
- Is there valuable work you'll lose?
Send a Better Prompt After Rollback
After rolling back, don't just repeat the same request!
Give the agent more context:
Don't do this:
(After rollback)
You: "Add a checkout page"
(Same request that caused problems)
Do this instead:
(After rollback)
You: "Add a checkout page with Stripe integration.
Make sure to:
- Test the payment flow
- Handle errors gracefully
- Keep the existing discount code working
- Test everything before finishing"
More details = Better results!
Does Rollback Cost Credits?
Good news: Rollback itself is free.
However:
- You'll need to spend credits again to rebuild features you lost
- If you rolled back 30 minutes of work, you'll need credits to redo it
Example:
Built feature A: 500 credits
Built feature B: 300 credits
Built feature C: 400 credits (broke everything)
Roll back to before feature C
↓
Feature C work lost, but you get features A & B working
To rebuild C better: ~400 credits again
## Rollback vs Forking
Real Examples
Example 1: Broken After Styling Changes
Message 20: "App works perfectly!"
Message 25: "Changed colors, now buttons don't work"
Action: Roll back to Message 20
Result: App working again, can try styling more carefully
Example 2: Agent Misunderstood
Message 15: "Build a simple blog"
Message 22: Agent built a complex social network instead
Action: Roll back to Message 15
New prompt: "Build a SIMPLE blog - just posts and comments,
nothing else. Keep it minimal."
Result: Got what you wanted!
Example 3: Repeated Failed Fixes
Message 30: "Database queries working"
Message 32: Database breaks
Message 33: Agent tries fix 1 - doesn't work
Message 34: Agent tries fix 2 - still broken
Message 35: Agent tries fix 3 - worse!
Action: Roll back to Message 30
New prompt: "The database queries were working.
I just want to add pagination - please be very
careful not to break existing queries."
Result: Pagination added without breaking things!
Tips for Using Rollback Effectively
Good Practices
- Roll back early - If you see problems, don't wait
- Choose the right checkpoint - Go back to last stable state
- Improve your prompt - Add more detail when you restart
- Test after changes - Ask agent to test before moving on
Avoid These Mistakes
- Rolling back too far - Don't go back further than needed
- Repeating same prompt - If it failed once, explain better
- Not confirming it worked - Test the feature before continuing
- Forgetting to save info - Copy any important notes before rolling back
Quick Decision Guide
Should I roll back?
Is something broken? → YES → Roll back!
Did agent misunderstand? → YES → Roll back!
Stuck in error loop? → YES → Roll back!
Is it just a small bug? → NO → Ask agent to fix it
Do I want to try something else? → MAYBE → Consider forking instead
How to Access Rollback
On Desktop
- Look at the chat interface
- Find the rollback button (usually top or side)
- Click it
- Select checkpoint
- Confirm
On Mobile
- Look for the clock icon
- Tap it
- Browse conversation history
- Select where to roll back to
- Confirm
Success
Can't find it? Check out the reference video at the beginning of this article!
Remember
Rollback is FREE - No extra credits charged
Cannot be undone - Choose carefully!
Lose work after that point - Make sure that's okay
Give better prompts after - More detail helps
Use early if stuck - Don't wait too long
Test after rolling back - Make sure it's actually working
Common Questions
You'll lose work done after the point you roll back to.
Everything before that point is kept!
Example:
- Messages 1-20: ✅ Kept
- Messages 21-30: ❌ Lost (if you roll back to 20)
Rollback affects your Preview/development version.
Your deployed app stays as-is until you deploy again.
Safe to experiment in Preview!
You can roll back to any point in your conversation history!
Even back to the very beginning if needed.
Unfortunately, you cannot undo a rollback.
The work is gone - you'll need to rebuild it.
Tip: Always double-check before confirming!
Rollback: Keep some work, lose recent changes
Starting over: Lose everything, completely fresh start
Rollback is better - You keep the good work!
Still Stuck?
If rolling back didn't help:
- Try the troubleshoot agent - It can find deeper issues
- Fork the project - Start fresh with current code
- Ask for help - Describe the problem clearly
Also, check out the troubleshooting tips we have.
I rolled back but still having issues.
What was working: [describe]
What's broken: [describe]
What I tried: [describe]
Can you help?
Pro tip: Think of rollback as your "safety net" - don't be afraid to use it! It's better to roll back early than to let the agent struggle with a broken state.
