How Do You Review and Undo What Cursor's Agent Changed?
Agent applies its edits as it works, and you review them in the diff view. Press Cmd+Return to accept all suggested changes, or Cmd+Shift+Backspace to reject all (Ctrl on Windows and Linux). To go back further, hover over an earlier message and click Restore Checkpoint, which reverts files to that point.
Review the changes on this branch using @Branch. List anything that: 1. Wasn't part of this task: [describe the task] 2. Doesn't match the pattern in [@reference file] 3. Has missing error handling or an untested path Don't change anything. Give me a list with file and line, and mark the items you'd revert first.
- Rejectthe latest edits are wrong
- Restore Checkpointthe run went wrong, keep the chat
- Gitpermanent history you control
Try it now
- 1Ask Agent for a small change, then watch the edits appear in the diff view.
- 2Press Cmd+Shift+Backspace (Ctrl+Shift+Backspace) to reject them and confirm the files are back as they were.
- 3Ask for the change again, then hover over your earlier message and click Restore Checkpoint. It worked if the files revert while the conversation stays in place.
Use it when
After every Agent task, and while it runs if you see it heading the wrong way. Cursor's course says to click Stop or press Cmd+Shift+Backspace to cancel and redirect, rather than waiting for it to finish.
Skip it when
Don't rely on checkpoints for work you'd be upset to lose. The docs say to use them only for undoing Agent changes and to use Git for permanent version control. If a change is worth keeping, commit it.
Why it works
Because edits land in your working files as Agent goes, tests and dev servers see them right away. Review is therefore a real checkpoint rather than a preview. Cursor's docs say Agent snapshots modified files automatically before significant changes. Restoring reverts files only and leaves the conversation as it is, so you can correct course in the same thread. To shorten the conversation as well, fork the chat from an earlier message. Checkpoints are stored locally and are separate from Git, so they aren't a substitute for commits.
Example
Say you ask Agent to add pagination to a list endpoint. It also rewrites a helper you didn't mention. In the diff view you reject that hunk and keep the rest. Later, a follow-up request goes badly across six files, so you restore the checkpoint on the message before it, then send a narrower version. Then you commit, because the checkpoint won't help once you've moved on to other machines or branches.
Going further
Cmd+Shift+Backspace does two jobs. Cursor's shortcut reference lists it as Cancel generation and, when suggested changes are showing, as Reject all changes. If you press it to stop a run and press it again, you may throw away the work you meant to keep, so pause and look before pressing twice. For a second opinion on the whole diff, click Review then Find Issues after a task finishes, or see Agent Review.
Common mistakes
- Accepting all because the summary sounded right. The summary is the agent's account of what it did, and the diff is what it actually did.
- Treating checkpoints as backups. They're local and separate from Git.
- Pressing the cancel shortcut twice and rejecting edits you wanted.
- Expecting a restore to shorten the chat. It reverts files only, so a wrong turn stays in the context unless you fork or start fresh.
Sources
- Agent mode, Cursor Help
- Cursor Agent, Cursor Docs
- Keyboard Shortcuts, Cursor Docs
- Reviewing and testing code, Cursor Learn
- Your first project, Cursor Help
Checked 6 November 2026. Products change often, so confirm details with the vendor.