The most useful tool in the drawer is the esc-esc.
Claude Code keeps a quiet ledger of every change it makes — a
snapshot of your files before each turn. When a session
strays off-piste, you don't have to wrestle with
git reset or scrub your editor for an undo stack that
starts at the wrong moment. Press esc twice, or run
/rewind, and the agent winds the crown back to a
previous checkpoint with the conversation context intact.
Think of it as the watchmaker's loupe and tweezers: you can lift a single piece off the dial — just the files, just the conversation, or both at once — without disturbing the rest of the movement. Pick the granularity, and the run resumes exactly there.
› esc esc # open the checkpoint picker
› /rewind # same thing, longhand
◇ rewind code only — restore files, keep the chat
◇ rewind conversation only — keep files, replay from a prior turn
◆ rewind both — wind the crown all the way back
Reversible by design
Every edit, write, or shell command is bracketed by a snapshot. The cost of trying something bold drops to nothing — the cost of not being able to back out was always the high one.
Three escapements
Rewind just the code, just the conversation, or both together. Useful when a refactor went sideways but the design discussion that produced it was sound.
Outside the loupe
Files touched outside Claude Code aren't tracked. Like any good atelier: it logs what it did itself, and trusts your own ledger — git, your editor — for the rest.