Black Friday sale: 30% off Flywrite

Rewind is Claude Code's undo, opened with the /rewind command or by pressing Esc twice with an empty prompt, which lists your earlier prompts so you can restore the files, the conversation or both to that point.

How to rewind

  1. Run /rewind, or press Esc twice with the prompt empty.
  2. Pick the prompt you want to go back to.
  3. Choose what to restore.
/rewind
Option What it does
Restore code and conversation Files and conversation go back to that point
Restore code Files go back; the conversation stays
Restore conversation The conversation goes back; files stay as they are
Summarize from here, Summarize up to here Compress part of the conversation; files don't change

The two code options appear only when that point has file changes Claude Code tracked.

What it doesn't undo

  • A file that only shell commands changed.
  • Most edits made by subagents.
  • Your own edits outside Claude Code, and edits from another session, unless they touched the same files.
  • Old sessions: Claude Code keeps snapshots for the 100 most recent checkpoints in a session and deletes them about 30 days later by default.

Anthropic's docs call checkpoints quick, session-level recovery and point to Git for lasting history.

In Flywrite

/rewind works in Flywrite's terminal as it does anywhere. For what it misses, Flywrite saves a checkpoint of the whole project when Claude Code starts in its terminal. Open Versions (⌘⇧V) and restore the project or one file from it. The guide to rolling back an agent's edits covers both, agent by agent.

Questions

Does /rewind undo changes made by shell commands?

Only to files Claude already edited with its edit tools in that conversation. A file that only shell commands changed isn't tracked and stays as it is.

Is rewind the same as Claude Code's undo?

Yes. Claude Code's undo is the rewind menu, opened with /rewind or Esc twice. It works from the checkpoint Claude Code saves before each prompt.

Sources
  1. Claude Code: Checkpointing. Checked .
  2. Flywrite docs: Checkpoints & versions. Checked .
  3. Flywrite docs: Writing with Claude Code. Checked .

Write with your agent in a writing app.

Buy now