Checkpointing automatically captures the state of your code in Claude Code before each edit, letting you attempt ambitious, wide-scale changes knowing you can return to a prior state if things go off track. Every prompt you send creates a checkpoint, and checkpoints persist across sessions — they're cleaned up along with the session after 30 days by default (configurable).
You open the rewind menu by running the /rewind slash command, or by pressing Esc twice when the prompt input is empty (if there's text in the input, double Esc clears it instead). The menu lists each prompt from the session; for the point you pick you can Restore code and conversation, Restore conversation (keep current code), or Restore code (keep the conversation). The same menu also offers Summarize options that compress part of the conversation to free context, similar to a targeted compaction.
Checkpointing only tracks files edited through Claude's file-editing tools in the current session. It does not undo files changed by bash commands Claude runs (for example rm, mv, or cp), and it normally doesn't capture manual edits you make outside Claude Code or changes from other concurrent sessions. The docs frame checkpoints as "local undo" and Git as "permanent history" — they complement, but don't replace, version control. See the official Claude Code docs for current behavior.
Why it matters
Checkpointing lowers the cost of letting Claude Code attempt large, multi-file changes: if an approach goes sideways you can rewind to a known-good state in seconds instead of manually reverting edits or untangling a half-finished refactor, which makes it far safer to delegate bold work to the agent.
See Checkpointing in action across releases — browse the Claude Code changelog.
Get release alerts