Restore Checkpoint: Your Undo Button
Cursor just rewrote three files you didn't ask it to touch. It put a component in the wrong folder, or it "helpfully" restructured a layout that was already fine. Your first instinct might be to start manually undoing changes file by file. Neither that nor re-prompting from scratch is necessary — every AI edit in Cursor creates a checkpoint, and one click gets you back to exactly where you were.
Why this matters more with agents than with autocomplete
Traditional autocomplete suggests one line at a time — you accept or reject it, and the blast radius is tiny. An agentic AI editor is different: it can touch multiple files in a single turn, restructure a folder, rewrite a function signature and every call site that depends on it. That's what makes it powerful, and it's also what makes a bad turn expensive to unwind by hand. Files are already changed on disk the moment the agent finishes — there's no implicit "preview" state. If the edit is wrong, you need an explicit way to revert it.
That's what checkpoints are for. They aren't a separate feature you have to enable; every AI-driven edit in a Cursor chat automatically creates one.
What restoring actually does
Each checkpoint marks the state of your files at a specific point in the conversation — typically right before an agent turn made changes. When you restore to a checkpoint, everything made after that point is discarded, and your files are reset back to how they were at that moment. It's a genuine revert, not a soft "hide this from view" — the files on disk go back to their earlier state.
This is the difference between restore checkpoint and simply scrolling past a bad response in the chat: scrolling past does nothing to your files, which stay changed. Restoring is the only way to actually undo edits that have already landed.
How to use it
- When an agent turn produces something wrong — the wrong folder, a broken layout, an overreaching refactor — scroll back up the chat.
- Find the checkpoint marker that sits just before the bad edit happened.
- Click restore checkpoint on that marker.
- Confirm. Everything generated after that point disappears, and your files revert to match — including files that were created or deleted in the meantime.
Cursor also exposes an "undo all" control in some contexts for reverting the most recent set of AI changes in one step, which is functionally the same safety net for the immediate last turn.
Where this earns its keep
- A big refactor that goes sideways. If the agent starts a large restructuring and takes a wrong turn halfway through, restore to before it started rather than trying to hand-patch the result.
- Auto-run ("YOLO") mode left on. When the agent is allowed to run commands and make edits without per-step approval, checkpoints are the safety net that makes that mode tolerable.
- Exploratory prompts. When you're not sure an approach will work, let the agent try it. If it's bad, restore costs you nothing.
Pitfalls
- Restoring discards everything after the checkpoint, not just the part you didn't like. If the agent made three good changes and one bad one in the same turn, restoring removes all of them.
- Checkpoints aren't a substitute for commits. They live inside the chat session; a git commit is still your longer-term save point once you're happy with a state, independent of the chat history.
- Don't wait too long to notice a bad edit. The longer you keep prompting on top of a bad change, the further back you'll eventually need to restore, and the more good work you'll lose alongside it.
Building an AI feature? Yeda AI designs, audits, and ships production LLM systems.