Skip to content
zero2vibecodelearn vibe coding
Level 0 · Session control 6 min Reviewed by the author · Oct 15, 2026 Verified against Claude Code v2.1.292 · Oct 15, 2026Official docs: Checkpointing and /rewindSomething out of date? Tell us

/rewind: roll back a step that went wrong

Claude went the wrong way? /rewind or a double Esc takes you back to any earlier request — rolling back the code, the conversation, or both. But a rewind only sees edits made with the file-editing tools, not changes made by commands.

Level 0 · 0 / 4 lessons0%
In this lesson

No hands-on task in this lesson — just read it through and answer the questions.

You asked Claude to tweak one function, and it rewrote half the file and broke the code next to it. You could explain what went wrong and ask it to put things back. There is a faster way — roll back.

How to open a rewind

Two equivalent ways:

/rewind

or press Esc twice while the input line is empty.

A list of your earlier requests opens. You pick the one to go back to — the state before it — and decide what exactly to restore.

What you can restore

OptionWhat happens
Code and conversationfiles and conversation return to their state before the chosen request
Conversation onlythe conversation rolls back, the files stay as they are
Summarize from herethe conversation after the chosen point is folded into a summary

The most common case is the first: the edit failed and you want it as if it never happened. After a rewind, your old request comes back into the input line. You can tweak it and send it again, or clear it with the same double Esc.

If you have a diff panel open, it may keep showing the rewound edit for a while — the panel refreshes on the next change. For the truth about the files, git status is always right.

The limit of a rewind

This is the most important part of the lesson. Claude changes files in two ways:

  • with file-editing tools — when it edits the text of a file itself;
  • with shell commands — rm, mv, sed, running scripts.

The checkpoints /rewind relies on see only the first kind. If Claude deleted a file with rm, a rewind will not bring it back. If the menu offers only “restore conversation” with no “code” option, the change was made by a command.

Hence the habit: commit before a risky task. Then whatever /rewind cannot reach, git restore will bring back.

Quick check

The rewind menu offers only 'restore conversation', with no code option. What does that mean?

Careful

Check your understanding

Answered 0/3
Mode:

How do you open the rewind menu?

Claude deleted a file with the rm command. Will /rewind bring it back?

What is the difference between "restore code and conversation" and "restore conversation only"?

Finish the task in the terminal and answer the questions to complete the lesson.

📝 My notes

Saved automatically in this browser · shows up on the Notes page.

Lesson Q&A

How do you open the rewind menu?

With /rewind, or by pressing Esc twice on an empty input line — /rewind and a double Esc on an empty input open the same menu: you pick the request to go back to and what to restore.

Claude deleted a file with the rm command. Will /rewind bring it back?

No — a rewind only sees edits made with the file-editing tools; changes made by commands stay — Checkpoints record the edits Claude makes with its file-editing tools. What it did through shell commands — deleting, moving, running scripts — a rewind will not undo. That is what git is for.

What is the difference between "restore code and conversation" and "restore conversation only"?

The first rolls back both the files and the conversation; the second restores the conversation and leaves the files as they are — You can roll back everything at once, or only the conversation — for example, when you are happy with the code but the conversation went the wrong way.

The rewind menu offers only 'restore conversation', with no code option. What does that mean?

The code option exists only for edits made with the file-editing tools. Roll back changes made by commands with git — for example, git restore.

Move between lessons with ← → · search with ⌘K

Written and reviewed by Mikhail Kuzmitskii