Overview
How might we let people undo a bad agent turn by jumping the thread back to an earlier prompt or change?
When agent turns mutate durable state in a conversation
- Coding agents that edit files across several prompts in one thread.
- Multi-step chats where a later ask undoes or breaks earlier work.
- Products where users need to discard “everything after this reply” without hunting version history.
- Any flow where confidence comes from knowing you can return to a labeled turn, not after something breaks.
When snapshots would add noise without recovery value
- Read-only assistants that never mutate state worth snapshotting.
- Environments with no durable storage for checkpoints.
- Tiny single edits where ordinary undo already covers risk.
States
Design checkpoints as restore points on the thread, not as a buried version menu.
Turn complete
An agent reply finishes. That point in the thread becomes a restorable checkpoint.
Thread continues
Later prompts and edits stack on top. Earlier checkpoints stay attached to their turns.
Restore offered
Earlier agent replies expose “Restore to this checkpoint” when newer turns exist.
Confirming
If restore removes later messages, say so before cutting the thread.
Restored
The thread ends at the chosen turn. Later prompts and their side effects are gone.
Continue from here
The user can prompt again from the restored point, or leave the checkpoint as-is.
Key UX elements
The parts that must be present for rollback to feel trustworthy.
Put restore on that turn in the thread.
A checkpoint action under an earlier agent reply beats a buried history panel.
One clear action: go back to this point.
Copy like “Restore to this checkpoint” should mean later turns disappear and work reverts.
Warn when later messages will be removed.
Ask “Discard all changes up to this checkpoint?” before cutting the thread. Keep Cancel and Continue only.
Anti-patterns to avoid
Checkpoints that exist but are not labeled to the agent step they protected.
Restore that partially applies and leaves systems inconsistent.
No checkpoint before irreversible external side effects (send, charge, delete).
Infinite checkpoint lists with no prune or favorite.
How products use it
| Product | Implementation |
|---|---|
| Cursor | Agent checkpoints and restore tied to code changes. |
| Git-based agents | Commits or stashes as restore points before bulk edits. |
| Design tools with AI | Version history snapshots before generative edits. |
| Devin-style coding agents | Workspace snapshots users can roll back after long runs. |
Implementation
Copy this prompt to generate a production-ready implementation in Cursor, Claude Code, Lovable, or any AI coding agent.
Generate a production-ready implementation of the "Checkpoints and Restore" AI interface design pattern.
Pattern Definition:Frequently asked questions
What are checkpoints and restore in agent UX?
Checkpoints capture named state before an agent makes a big change; restore returns to that state in one action so users can approve ambitious work without fear of permanent damage.
When should an agent create a checkpoint?
Before bulk edits, migrations, permission changes, or any step that is hard to reverse. Optionally let users pin checkpoints at milestones they choose.
How do checkpoints differ from reversibility marking?
Reversibility marking labels how hard an action is to undo. Checkpoints provide the actual restore mechanism. Use labels to set scrutiny and checkpoints to recover.