AI Field Guide
Claude Code commands

/rewind

Updated 2026-08-04

Questions this answers

  • Claude went down the wrong path and I want to get back to where things worked.
  • Can I undo the changes Claude just made?
  • I wish I could rewind the conversation a few steps.
  • How do I get back to a good state without git?

The Fix

/rewind rolls both your code and the conversation back to an earlier point, like a save point in a game. Hit Esc twice to open it, pick the prompt you want to return to, and Claude puts the files and the chat back the way they were then. It's separate from git, so you can bail out of a bad path even if you never committed.

/rewind only undoes edits Claude made through its own file tools, though. Changes from a bash command it ran, or from a background subagent, stay put. Treat it as a safety net for the main thread, and reach for git when something outside that touched disk.

When to Use It

Hit it the moment you realize Claude has wandered off, three prompts deep into an approach that isn't working. Instead of trying to talk it back, rewind to the last good point and steer differently from there. It's also handy when an experiment made a mess of your files and you just want the clean slate back.

Because it restores the conversation too, it doubles as a way to reclaim context: rewind to before a long tangent and that whole detour drops out of the window. Just remember what it won't catch, and commit to git at real milestones so you've got a floor underneath the rewind.

Best Practices

Related