Cole Seifert

Keyword: UNDO

The Claude Code safety-net cheat sheet

Free guide. No signup. 1 min read Checked 2026-10-23 against code.claude.com docs.

Download PDF Watch the reel on Instagram

From @learningwithcole

Undo anything Claude did: checkpoints

  1. Make sure the prompt box is empty. If there's text, Esc Esc clears it; press ↑ to get it back.
  2. Press Esc Esc, or type /rewind. /checkpoint and /undo work too.
  3. Pick the message from just before things went wrong.
  4. Choose an option:
    • Restore code and conversation: as if it never happened
    • Restore conversation: keep the code, rewind the chat
    • Restore code: keep the chat, roll back the files
    • Summarize from here / up to here: shrinks context without touching files

What it does NOT undo:

  • File changes made by terminal commands Claude ran (e.g. a migration or rm), unless Claude had also edited that file with its edit tools
  • Edits you made yourself outside Claude Code
  • Most subagent edits
  • Symlinked files

Claude Code keeps the 100 most recent checkpoints per session; old snapshots are cleaned up after about 30 days.

Rule #1: commit before anything big

Checkpoints are not Git.

Terminal
git add -A && git commit -m "before Claude refactor"

If everything goes wrong: git restore ., or git reset --hard HEAD, which discards ALL uncommitted changes.

Plan before it touches files

Press Shift+Tab until you see plan mode, or type /plan fix the login bug. Claude reads the code and writes a plan, and edits wait until you approve it.

Ask a side question without derailing it

/btw what was that config file called? The answer pops up but doesn't go into the conversation.

Pick up where you left off

claude --continue resumes your last conversation. /resume lets you pick any older one.

That’s the whole guide.

Want the next tool when it posts?

A list for new guides is on the way. The guides stay free here either way.

$ list statusnot open yet

The email list isn’t live yet. Email me if you want a heads-up when it opens.

Email me for a heads-up [email protected]