Cindy Zhu.
← all free guides
Building & apps Claude

Claude Code rewind + checkpoints: undo anything in one keystroke

Hey, it's Cindy ๐ŸŒฑ Claude Code saves a snapshot of your files every single time you hit enter. That means you can tell it to try the reckless version, the big messy refactor you would never normally allow, and if it flops you roll everything back in one keystroke. Here is the exact setup, the shortcuts, and the one caveat that keeps you safe.

Everything below is from Anthropic's official docs: Claude Code checkpointing.

the basics

How checkpointing works ๐Ÿง 

  1. Every prompt is a checkpoint. Before Claude touches anything, it snapshots your files.
  2. Be reckless on purpose. So you can tell it to try the risky refactor on purpose, then undo instantly if it does not work.
  3. They survive a clear. Checkpoints even survive /clear, and they persist after you close your terminal.

the move

The rewind move ๐Ÿ”

  1. Ask for the reckless version. Tell Claude to try the risky thing you would normally tiptoe around (for example: "rebuild this the messy way I'd never normally allow").
  2. Let it run and rewrite files.
  3. Hit rewind. If it flops, press Esc twice on an empty prompt, or type /rewind.
  4. Pick what to roll back. A menu opens listing every checkpoint. Pick what to roll back: restore code and conversation, restore conversation, or restore code.
  5. Snap back. Select an earlier checkpoint and your files snap back to that state.

copy this

Try the risky prompt (copy-paste) ๐Ÿ“‹

๐ŸŽฒ the reckless prompt
Go ahead and try the version of this you'd normally warn me against. Rebuild [describe the thing] the aggressive / messy way, don't ask for confirmation on each step. I have checkpointing on, so if it flops I'll just /rewind. Show me the result and tell me what you changed.

a nice surprise

After /clear ๐Ÿงน

Run /clear, then press Esc Esc again and you will see a /resume (previous session) entry at the top. You can rewind to before the clear. Test this on Claude Code v2.1.191 or later so that entry appears.

what to watch

The one caveat (important) โš ๏ธ

Checkpointing tracks Claude's edits, NOT files deleted by a terminal command (a raw bash delete). So it is your fast undo, not a backup. Keep using Git for real version control. Source: Claude Code checkpointing.

Links used in the reel ๐Ÿ”—

  1. Checkpointing (all of the above): https://code.claude.com/docs/en/checkpointing
  2. Best practices (let it explore): https://code.claude.com/docs/en/best-practices

Stop protecting Claude. Let it explore. The undo is one keystroke away.

Want more like this? Follow @cindiezhu for daily AI you can actually use.