Claude Code Rewind

Every experienced developer values an undo button. Claude Code provides one through checkpoints. Before it edits a file, Claude Code saves a snapshot of the earlier state. A rewind brings your project and conversation back to a chosen moment, which makes bold experiments safe.

The Video Game Save Point

Game players save before a hard level. A failed attempt sends them back to the save point instead of the start of the game. Checkpoints give you the same safety net. Each prompt you send marks a point you can return to.

Prompt 1 ──●── edits saved
Prompt 2 ──●── edits saved
Prompt 3 ──●── edits go wrong
                 ↑
          Rewind to Prompt 2

How to Rewind

Two paths open the rewind menu.

  • Press Esc twice on an empty prompt.
  • Type /rewind and press Enter.

A list of earlier prompts appears. Pick the point you want to return to.

Three Restore Choices

ChoiceEffectUse It When
Code onlyRestores files; keeps the conversationThe edits failed but the discussion still helps
Conversation onlyRolls back the chat; keeps the filesThe talk drifted off course but the code looks fine
BothRestores files and conversationYou want a full return to an earlier moment

A Practical Scenario

A developer asks Claude Code to simplify a payment function. The result removes a safety check by mistake. Pressing Esc twice opens the rewind menu. The developer picks the prompt before the simplification and restores the code. The payment function returns to its previous form, and a new prompt with clearer instructions follows.

What Checkpoints Cannot Undo

Checkpoints track edits made through Claude Code's own file-editing tools. Changes created by other means stay outside the snapshot.

  • Files deleted or moved through terminal commands.
  • Edits you make by hand in your code editor.
  • Changes made by another program or another session.
  • Actions on outside systems, such as a database update or a sent message.
COVERED                          NOT COVERED
-------                          -----------
Claude's file edits              Shell commands like rm or mv
Claude's new files               Your own manual edits
                                 Database and network actions

Checkpoints Versus Git

Checkpoints handle quick, short-term undo inside one session. Git handles permanent history across days, branches, and teammates. The two tools work as partners. Use checkpoints for fast experiments and commit to git when a piece of work earns a permanent place.

Habits That Protect Your Work

Commit Before Big Tasks

A fresh commit gives you a rock-solid return point that no session limit can erase.

Rewind Early

Return to the checkpoint as soon as you notice a wrong direction. Waiting adds more edits on top of a bad foundation.

Describe the Mistake

Tell Claude Code what went wrong after you rewind. A clear correction prevents the same error on the second attempt.

Rewind Questions Beginners Ask

Does a rewind erase your git history? No. Git stays untouched. Can you rewind after closing the session? Checkpoints belong to the session, so plan on using them while the session stays open. Does rewinding cost money? The rewind itself needs no new AI work. Learn the Esc Esc shortcut early because it builds the confidence to try ambitious prompts.

Key Points

  • Claude Code saves a checkpoint before each round of edits.
  • Esc twice or /rewind opens the restore menu.
  • You can restore code, conversation, or both.
  • Shell commands and manual edits fall outside checkpoint coverage.
  • Git remains the permanent safety net.