Claude Code Checkpoints: Double-Esc to Undo a Botched Edit
There's one moment working with Claude Code that sends a chill down my spine. Claude rolls along great, then suddenly does something I never expected. When that happens I stop it fast and ask for a rollback — but sometimes the rollback itself goes sideways from what I meant. Now the new checkpointing feature ends all of that with two presses of Esc. I wrote this as someone running the May Week 20 update (checkpoint + /rewind).
01. Yesterday I pressed Esc twice for the first time
Yesterday I had Claude refactor a function, and when I looked at the result it had changed way more than I intended. Before, I'd panic first and dig through git diff to see what got wrecked while I rolled it back. But this time I tapped Esc twice and every changed file snapped back to its original state!!
Claude Code automatically saves a snapshot of your code state right before each change. You pick whichever snapshot you want to return to, and it reverts. What I liked most: no need to git commit, and no special command to memorize!
$ claude
> refactor this whole function
(Claude edits several files at once)
# result doesn't match what I meant — Esc twice
[checkpoint] reverted to 2 minutes ago
(files restored to just before the change, all at once)
# no git stash, no git reset needed
02. /rewind for a more explicit revert
Here's what I found from using it. For me, typing /rewind brings up a list of recent checkpoints, and I pick a point and jump back to it.
When two or three suspicious changes had piled up, this was great for cleaning it all up in one shot.
03. The difference from git reset, as I see it
I'm comfortable with git, so at first I thought "how is this any different from git reset?" After a few days of use I saw two decisive differences.
First, the big one: checkpoints get captured even without a commit. I tend to work without committing in the middle, so git reset had no way to recover those in-between changes for me. What I liked most is that checkpointing snaps automatically right before Claude touches anything — completely independent of commits.
Second, I liked that it reverts multiple files as one bundle. When a task touches several files at once, it was hard for me to track what I'd changed where. Checkpointing reverts a whole "unit of work" in one shot, so there's no tracking burden.
04. /goal delegation finally feels safe
In an earlier post I covered using the /goal command so Claude stops asking me every turn. Back then the one thing nagging at me was: what if Claude goes rogue mid autonomous run?
I think checkpointing shaved off most of that worry. Even if the result drifts off-course during delegation, two presses of Esc bring me back to the last safe state. So I've been using /goal more aggressively.
The pattern I bundle them in: I run
/goalfor an autonomous pass → let the result play out to the end → if I don't like it, Esc twice. For me, bundling these two features dropped the psychological cost of delegating way down.
05. A case where it doesn't work so well, in my view
From my few days of use: when each change unit is tiny, they pile up like grains of sand. In that case it was sometimes hard to judge which point to revert to.
Sources
- Claude Code — What's New (Week 20, May 11–15, 2026)
- Anthropic — Enabling Claude Code to work more autonomously
This is a first-person review after a few days of hands-on use. I received no sponsorship of any kind from Anthropic.
Original with full infographics and visual structure: https://jessinvestment.com/claude-code-checkpoints-double-esc-to-undo-a-botched-edit/
Top comments (0)