Have you ever let Claude Code run five steps forward while it was quietly working from the wrong interpretation of your request? Three files have changed, the tests look different, and when you finally want to back out, you can't tell how far back to go. Undo it by hand and the conversation context and the actual code drift apart. As an indie developer running automated posting across several sites, I have been tripped up by this "half-finished wrong turn" more times than I'd like to admit.
The June 2026 Claude Code update gave /rewind a meaningful boost in behavior and stability. The feature itself isn't new, but combined with lower memory use in long sessions and improved agent behavior, it has become a safety net you can actually lean on in production. Let me walk through when it earns its keep, how it differs from git, and the part that's easy to misread when you run things unattended.
What /rewind restores, and what it doesn't
During a session, Claude Code automatically records a checkpoint at each editing milestone. Run /rewind (or press the escape key twice in quick succession) and you get a list of those checkpoints to jump back to.
The most important thing to understand is that there are two separate things it can restore.
One is the conversation (the context): it rewinds your exchange with Claude back to the point you choose. The other is the code (the file contents): it returns the files Claude Code edited in that session to their state at the chosen point. The /rewind menu lets you pick between restoring both, restoring code only, or restoring the conversation only.
Knowing what it does not restore prevents most accidents. Files you edited by hand without going through Claude Code, side effects from bash commands like git or rm, and writes that already left the machine over the network (API calls, pushes, deploys) are all outside /rewind's reach. Think of a checkpoint as a snapshot of "edits Claude Code is aware of," nothing more.
How it differs from a git reset
You might think git already covers this. The use cases do overlap, but the two watch different things.
git reset and git stash restore only the state of your code — commits and the working tree. The story of how you and Claude arrived at that implementation, the conversation, lives nowhere in git. /rewind, by contrast, rewinds code and conversation together. You can step back, dialogue and all, to the moment just before you agreed on a direction.
Here's how I split them. For returning to a committed stable point, or any large redo that crosses branches, I reach for git. For backing out just the spot where "things drifted a moment ago" in the middle of uncommitted experimentation, I use /rewind. The latter cleanly recovers something git struggles to express: a state where conversation and code drifted at the same time. They don't compete. Rewinding conversation and code close together first, then finishing with git if needed, is the safer layering.
The actual rewind procedure
The more tangled the situation, the safer it is to keep the operation simple. This is the basic flow I use.
First, before rewinding, stash any uncommitted hand edits. Because /rewind may discard hand edits outside its checkpoints, get them out of the way as a precaution.
# Stash what you touched by hand before rewinding
git stash push -u -m "before-rewind"
# Confirm it was stashed
git stash listNext, open /rewind in Claude Code, find from the conversation history where the direction drifted, and select the checkpoint just before it. The trick is to pick the step before the off-course message, not the message itself. Rewind to a point that includes the drift and you'll simply resume from the same misunderstanding.
After rewinding, check just once that code and conversation aren't out of sync. Concretely, look for files that "shouldn't exist yet" at the restored point, and confirm the tests are back to their earlier shape. If that's clean, bring back only the hand edits you actually need from the stash.
# Verify the restored state, then pick up only the hand edits you need
git diff
git stash pop # if it conflicts, fold changes in one at a timeMake "stash, rewind, verify, selectively restore" a single habit and you'll remember the steps even in a moment of panic.
The part that's easy to misread in automation
This is the corner the official description doesn't quite show. /rewind is a safety net for interactive sessions, not an undo mechanism for unattended scheduled runs.
I run article generation across several sites automatically, but I do not design those jobs to be rescued after the fact with /rewind. The reason is simple: an unattended job usually races all the way to committing operations that reach outside — pushes, deploys — which is well beyond what /rewind can restore (local files and conversation). You can rewind what's on your machine, but published results don't come back.
So on the automation side, I don't count on /rewind at all. Instead I place a separate gate that can stop before any committing operation. Split the stage that edits code from the stage that sends it outward, and slot verification in before sending. /rewind shines when you're sitting in front of the screen, working things out through dialogue. Keep the two roles straight and they divide cleanly.
If the long session itself feels unstable, context degradation may be happening before any rewind even enters the picture. I cover the warning signs and remedies in How to Keep Accuracy in Long Claude Code Sessions: Signs of Context Degradation and What to Do. For cases where the session itself won't restore, see also Fixing Claude Code When resume Won't Restore Your Previous Session.
Designing so you rarely need to rewind
/rewind is a reassuring safety net, but reaching for it often is also a signal that there are a lot of misreads you could have headed off earlier. What I try to do is put "what changes, and how" into words and agree on it once before handing over anything large. A short confirmation of the direction up front steadily reduces the situations where you go five steps and then rewind.
Things will still drift sometimes. And simply knowing /rewind is there widens how boldly you can delegate. A safety net is something you set up so you'll need it less often — seen that way, the value of this feature is less "you can rewind" and more "you can move forward without fear."
Next time you open Claude Code, try pressing the escape key twice to bring up the checkpoint list once. Just seeing with your own eyes where you could return to will make your decision faster when it matters. Thank you for reading.