
Don't Ctrl+Z Your AI Work — Claude Code's /rewind Menu Gives You Three Better Options
Chris Harper
2 min read
Aug 18, 2026 · 04:10 UTC
Press Esc twice or type /rewind to get a menu that independently rewinds code, conversation, or both — without losing the other, and without running git reset.
Claude Code automatically snapshots your file state before each user prompt. When something goes sideways, most engineers reach for git restore or git reset and lose progress. /rewind is more surgical.
What /rewind gives you
Restore code, keep conversation. Revert the files to the checkpoint, but keep the chat context. You can immediately try a different approach without re-explaining the task, the constraints, or the background.
Restore conversation, keep code. Go back to an earlier message while keeping whatever Claude just wrote. Useful when you want the code but want to re-ask a question differently — e.g., you got the output you wanted but the conversation drifted and you need to redirect.
Summarize from here. Compress the conversation backward from this point, freeing context window space without touching the code. Equivalent to a manual /compact targeted at one section.
Activate it
Esc Esc → opens the rewind menu (fastest)
/rewind → same menu from the prompt
Navigate the checkpoint list, pick one, and choose which dimension to restore.
What checkpoints do and don't capture
- Captured: every file Claude edits through its own file editing tools.
- Not captured: files modified by
Bashcommands or external processes.
For Bash-modified files, git diff is still your source of truth. Before a risky batch of edits, consider asking Claude to explain what it's about to do, then let it proceed. If the output is wrong: Esc+Esc → Restore code, keep conversation → redirect.
Sources: Checkpointing — code.claude.com