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
| Option | What happens |
|---|---|
| Code and conversation | files and conversation return to their state before the chosen request |
| Conversation only | the conversation rolls back, the files stay as they are |
| Summarize from here | the 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
To keep an edit rewindable, it helps to ask Claude directly: “use the edit tool, not a shell command”. Above all, commit before every risky task: /rewind does not replace git, it complements it.