Undo what Claude Code did with /rewind

Claude edited the wrong files, or went down a path you do not want. Claude Code keeps checkpoints as you work, so you can step back without hunting through your files. It has limits, and it is worth knowing them before you need it.

How checkpoints work

Open the menu

Type /rewind, or press Esc twice when the prompt box is empty. If the box has text in it, a double Esc clears the text instead, and you can bring it back with the Up arrow. The menu lists the prompts you sent in this session. Pick the point you want, then pick an action.

The actions

The two code options only appear when the chosen checkpoint has tracked file changes. After a restore or "Summarize from here", the original prompt returns to the input box so you can edit it and send it again.

Summarizing does not touch your files, and the original messages stay in the session transcript. To steer the summary, highlight a Summarize option and type instructions where it says "add context (optional)". If you ran /clear earlier in the same Claude Code process, the menu also shows a /resume entry at the top for the session from before the clear.

When it is useful

To branch off and try something different while keeping the original session whole, the documentation points to /branch or claude --continue --fork-session instead of rewinding.

What it cannot undo

It is not version control

The documentation says checkpoints are for quick recovery inside a session. For history you can rely on, and for working with other people, keep committing to git. A good habit is to commit before you start something big.

Try it on something harmless

  1. In a scratch folder, ask Claude to create a small file.
  2. Type /rewind, choose the prompt, and choose "Restore code".
  3. Check that the file is gone and the conversation is still there.

This follows Anthropic's checkpointing documentation as we read it in October 2026. We are not affiliated with Anthropic. We wrote this from the documentation and have not tested every case.

See also: Claude Code sessions: resume, name, branch.

The free loop-stop skill gives long tasks a limit and a stop rule. If you want a second pair of eyes on your CLAUDE.md and settings, the Tune-Up Kit is a checklist for exactly that.