Claude Code automatically snapshots your files before each change. Press Escape twice or type /rewind to roll back the code, the conversation, or both — so a bad edit is never permanent.
Before Claude Code edits your files, it quietly creates a checkpoint — a snapshot of the current state. You don't configure this; it happens on its own as part of normal work. That means there's always a clean point to return to if a change goes sideways.
This is the difference between editing nervously and editing freely. The net is already hung.
When something breaks, tap the Escape key twice. That opens a scrollable timeline of every checkpoint Claude has made this session. You can also type /rewind to get the same menu. Pick the point you want and restore.
It's one reflex to learn, and it replaces the panic of 'did I just lose an hour of work?'
# in Claude Code Esc Esc # open the checkpoint timeline /rewind # same menu, typed # pick a checkpoint -> restore
Rewind lets you choose what travels back. Roll back just the files and keep your conversation going. Or roll back the conversation too, if the whole direction was wrong. You decide what returns to the earlier state and what stays.
That control is what makes this more than a plain undo button — you can keep what you learned while discarding what you built.
The real payoff isn't the feature — it's the posture it gives you. When undo is free, you try the bold refactor you'd been avoiding. If it's wrong, you're back to safe ground in two seconds. Courage is cheap when mistakes are cheap.
This is sovereignty over your own work: you own the file, you own the history, and no single change can cost you the whole thing.
A short pre-flight + recovery checklist so you can let Claude make big changes and always get back to safe ground.