← Claude Code Hub
✦ Tip #002 Feb 3, 2026

Claude Code Rewind: Undo Changes Instantly with Checkpoints

Every prompt creates an automatic checkpoint. If Claude breaks something, press Esc twice and rewind to any previous state in seconds.

Claude Code automatically snapshots your code before every edit. Each time you send a prompt, a checkpoint is created. If Claude takes a wrong turn — breaks a feature, goes down the wrong path, or over-engineers a solution — you can rewind to any previous state in seconds. Checkpoints persist across sessions and are cleaned up automatically after 30 days.

Result:

> Esc Esc  (press Escape twice)

┌─ Rewind to ──────────────────────────┐
│ ● Message 5: "Add auth middleware"   │
│ ○ Message 4: "Create user model"     │
│ ○ Message 3: "Set up database"       │
│                                      │
│ Restore: ◉ Both  ○ Code  ○ Convo    │
└──────────────────────────────────────┘

Setup

No setup needed. Checkpointing is enabled by default.

1. Make some changes with Claude

Work normally — every prompt you send creates a checkpoint automatically.

2. Rewind when needed

Press Esc twice quickly, or type /rewind. Select the checkpoint and what to restore:

Esc + Esc     → Opens the rewind menu
/rewind       → Same thing, via command

3. Choose what to restore

Option What it does
Both code and conversation Restores files and rewinds the chat to that point
Code only Reverts file changes, keeps the full conversation
Conversation only Rewinds the chat, keeps current file state

Reference

Feature Details
Trigger EscEsc or /rewind
Checkpoint creation Automatic on every user prompt
Persistence Survives session restarts and /resume
Retention 30 days (configurable via cleanupPeriodDays)
Tracks File edits made through Claude's editing tools
Does NOT track Bash commands (rm, mv, cp), external edits

Limitations

  • Files modified by bash commands (e.g., rm file.txt) are not tracked
  • Manual edits you make outside Claude Code are not captured
  • Checkpoints are session-level recovery, not a replacement for Git

Official docs: Checkpointing

Esc Esc rewinds, but a single Esc is a different move: stop and redirect Claude mid-task without losing what it's done.

Free guide

51 tips to master Claude Code.

One page per tip. Five chapters. What I actually use daily in production — no theory, no fluff.

  • I. Getting started 10 tips
  • II. Awareness 3 tips
  • III. Mastery 22 tips
  • IV. Autonomy 10 tips
  • V. Comparison 6 tips
Are you a professional Web developer?

You'll receive the guide by email · You join the Gravitas newsletter · Unsubscribe anytime

of 51
#

Wmedia · 51 Tips
Free guide · 51 tips · 5 chapters

51 tips to master Claude Code.

Are you a professional Web developer? · Unsubscribe anytime