Sign up and get 15% off every plan.

Sign up
AI Product Design
Get full access
All case studies

Case study · Cursor Agent · Anysphere

An agent you can stop and rewind

Cursor's agent can change many files in one go, so the product lets people plan with it first, watch the changes, stop it and roll back.

The problem

A coding agent can change dozens of files in one request, far faster than a person can read them. If it heads the wrong way, the developer needs to notice early and undo cleanly. The design had to keep a fast agent visible and reversible.

One agent task, with exits along the wayTap the parts

Each step gives the developer a place to change course.

The design decisions

  1. Agree on a plan before any code

    In Plan Mode the agent asks clarifying questions, studies the codebase and writes an implementation plan. The developer edits the plan in the chat or as a file, then clicks to build when it looks right. A misunderstanding caught in the plan takes one sentence to fix, while the same mistake caught after the code is written means reviewing every changed file.

  2. Show changes as they happen

    A diff view shows each change while the agent makes it. If the work is going the wrong way, Stop or Cmd+Shift+Backspace cancels the run, so the developer can redirect it without waiting for a long task to finish.

  3. Save a restore point before big edits

    The agent takes a checkpoint of the files before significant changes. Restoring one puts the files back and keeps the conversation, so undo doesn't depend on the developer remembering to save first, and they can tell the agent what went wrong before it tries again.

  4. Ask for a second look at the end

    When a task is done, Review and then Find Issues runs a separate code review that goes through the agent's edits line by line and flags likely problems. The developer gets a check on code they didn't write at the moment they decide whether to keep it.

What to take from it

  1. Let people agree on the plan before an agent starts changing things.
  2. Show an agent's work live and keep a stop button in reach.
  3. Take restore points automatically, so undo never depends on the user remembering to save.
Go and look

Cursor has a free plan with a limited number of agent requests. Open a small project, press Shift+Tab in the chat to switch to Plan Mode, ask for one change, and note each point where you could edit the plan, stop the run or restore a checkpoint.

The lessons it belongs to