BUILDING & APPS
Claude Code rewind + checkpoints: undo anything in one keystroke ⚡
Master this high-ROI AI workflow: Claude Code saves a snapshot of your files every single time you hit enter. That means you can tell it to try the reckles
Master this high-ROI AI workflow: 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.
The real unlock of AI agents is not full autonomy, but human-in-the-loop systems design. Structure your agent inputs with explicit constraints, negative prompts, and automated test checkpoints. When building tools, keep token consumption lean by caching system prompts and isolating tasks into specialized sub-agents.
Everything below is from Anthropic's official docs: Claude Code checkpointing.
How checkpointing works 🧠
- Every prompt is a checkpoint. Before Claude touches anything, it snapshots your files.
- Be reckless on purpose. So you can tell it to try the risky refactor on purpose, then undo instantly if it does not work.
- They survive a clear. Checkpoints even survive
/clear, and they persist after you close your terminal.
The rewind move 🔁
- 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").
- Let it run and rewrite files.
- Hit rewind. If it flops, press
Esctwice on an empty prompt, or type/rewind. - 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.
- Snap back. Select an earlier checkpoint and your files snap back to that state.
Try the risky prompt (copy-paste) 📋
After /clear 🧹
/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.The one caveat (important) ⚠️
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 🔗
- Checkpointing (all of the above): https://code.claude.com/docs/en/checkpointing
- 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.