← all articles

Claude Code rewind didn't undo everything? What /rewind restores and what it can't

You ran /rewind, Claude's edits went back, and the mess the agent made is still there.

Claude Code rewind restores the files Claude edited with its file editing tools, from a checkpoint made each time you send a prompt that starts a turn. Anthropic's docs, checked December 3, 2026, say a file that only Bash commands changed isn't tracked, so /rewind leaves it as it is. For those files, use Git. To see what the agent actually ran, press Ctrl+O for the transcript viewer.

If the output you need scrolled past in your terminal while it was the window you were working in, a screen history app like ReMynd can find it, starting from install.

Watched the agent's output fly past and need it back? Download ReMynd

What did the agent actually change?

Claude's own file edits, plus whatever its Bash commands and subagents touched. Rewind answers "what did Claude edit with its own tools." It doesn't answer "what did every command in this turn touch," so check that before you pick a restore option. That second question is the one that bites.

If the agent keeps circling back to the same broken approach after you rewind, Claude Code keeps suggesting the fix I already tried covers that loop.

Diagram with the eyebrow Claude Code rewind, titled What /rewind brings back, subtitled Checkpoints cover Claude's own file edits. Four rows with a pill each: Claude's file edits, green pill restored. Files only Bash changed, highlighted with a claret border, claret pill not tracked. Most subagent edits to other files, blue pill stay. Snapshots after the retention sweep, blue pill gone. A dark bar at the bottom reads: Output scrolled past? Search what was on your screen.

Rewind is session-level recovery for Claude's own edits. Illustration by ReMynd.

The 4 things to know about Claude Code checkpoints

Claude Code checkpoints follow these rules, and each one explains a rewind surprise.

  • One checkpoint per turn. Anthropic says every prompt you send that starts a turn creates a new checkpoint, and Claude Code keeps file snapshots for the 100 most recent checkpoints in a session.
  • One menu, several ways out. The Claude Code undo command, /undo, is an alias for /rewind, and both open the same menu. Its actions include Restore code and conversation, Restore conversation, Restore code, Summarize from here and Summarize up to here. The two code restore options appear only when the selected checkpoint has tracked file changes to revert.
  • Checkpoints survive a resume. Claude Code saves checkpoints with the conversation, so you can still run /rewind after you resume a session. Recovering a Claude Code session after a crash covers --continue and --resume.
  • Snapshots expire. By default, the retention sweep deletes a session's file snapshots about 30 days after the session last saved one. To keep them longer, set cleanupPeriodDays.

Claude Code rewind not working on some files? Here's why

Anthropic's limitations list explains why a rewind can leave files changed.

  1. Bash-only changes. Once Claude has edited a file with its file editing tools in your conversation, /rewind undoes changes Bash commands make to that file afterward. A file that only Bash commands changed stays as it is.
  2. Subagent edits. For most subagents, rewinding restores only the files Claude had already edited in your conversation. The subagent's edits to other files stay.
  3. Your own edits. Restoring code can discard changes you or another session made to a file Claude edited, after the selected checkpoint. Anthropic's advice is to commit or copy the file yourself before you restore.
  4. Links. Checkpointing doesn't rewind symlinked or hard-linked files. Claude Code skips them and shows a warning.

What each recovery option covers

Each recovery option covers a different part of what the agent did.

What you need backWhere to lookWhat it coversWhat it missesSource
Claude's file edits/rewind, Restore codeFiles Claude edited with its file editing toolsFiles only Bash changed, symlinked or hard-linked filesClaude Code docs
The conversation/rewind, Restore conversationRewinds to that message while keeping current codeFile changesClaude Code docs
What the agent ranCtrl+O transcript viewerDetailed tool usage and executionIt is a viewer, not a restoreClaude Code docs
Committed workGit, git reflogWhen branch tips and other references were updated in the local repositoryChanges you never committedGit docs
Output you saw on screenReMynd screen historyText that was on your screen in the window you were working in, after installAnything before install, apps and sites you excludeReMynd

A simple decision path

Stop at the first step that gets your work back.

  1. Open the transcript. Press Ctrl+O and read what the agent ran in that turn, so you know which files were touched and how.
  2. Rewind Claude's edits. Run /rewind (or press Esc twice on an empty prompt), pick the prompt before things went wrong and choose Restore code.
  3. Revert the rest with Git. For files only Bash changed, and the subagent edits rewind leaves in place, use version control, as Anthropic says. Run git status to see what is still modified.
  4. Send a prompt before you exit. Anthropic says rewound messages can return if you exit before your next prompt, because Claude Code saves the rewound conversation together with that prompt.
  5. Find the output that scrolled away. If you need the error or log the agent printed and your terminal no longer shows it, search your screen history for a word from it.

My habit, not Anthropic's: commit before any turn where the agent will run migrations or scripts. Anthropic's docs say checkpoints are not a replacement for version control, and when Anthropic launched checkpoints it recommended using them in combination with version control. If you also use Cursor's agent, Cursor restore checkpoint covers its checkpoints and what to try when the button is missing.

Where ReMynd fits

ReMynd is a desktop app that gives your computer local photographic memory, for you and your AI agents. It locally captures your screen history and keeps the searchable index on your computer.

So the build log or stack trace Claude Code printed, if your terminal was the window you were working in after you installed ReMynd, becomes searchable by what it said. Text recognition reads the window you're working in, not the windows behind it. ReMynd's Claude switch sets up Claude Code with the remynd command and a skill, so Claude Code can search that history from the same terminal.

That's the bridge in giving an AI coding agent memory of your actual work, and giving Codex the bug report you read in Slack shows the same move with Codex. For the wider engineering setup, see ReMynd for engineers.

Your screen history is stored on your computer by default, and nothing is uploaded to us unless you turn on optional cloud sync. You can pause capture or block any app or site. That's how ReMynd's own pages put it, as of December 2026.

Claude Code uses Anthropic's model under your account, so what it retrieves may be sent to that model, the same way anything you paste into it would be. On a Mac, ReMynd needs screen recording permission, which Apple's guide puts in System Settings under Privacy & Security, Screen & System Audio Recording.

Honest limits

These are the limits I'd want to know before installing anything for this.

  • ReMynd's pages describe searching and reading your screen history, not restoring files. Use /rewind and Git for that.
  • ReMynd captures only what is on your screen, starting from install. It cannot recover past work, and it cannot see background or cloud agents.
  • Text recognition reads the window you're working in, so output in a window behind it won't be searchable by its words.
  • On a Mac, ReMynd needs Apple silicon and macOS 15 or later. ReMynd also runs on Windows 11 (x64 or arm64).

The short version

Rewind covers the files Claude edited with its own tools. Git covers the files only Bash changed and, for most subagents, their edits to other files, and Ctrl+O shows you what ran. If the problem is a Claude Code chat you can't find, how to search Claude chat history is the next read.

Want the next stack trace the agent prints to stay findable after it scrolls away? Download ReMynd

common questions

How do I rewind in Claude Code? +
Run /rewind, or its alias /undo, in your session. You can also press Esc twice when the prompt input is empty. The rewind menu lists the prompts you sent, and you pick the point to go back to.
Why didn't /rewind undo a change? +
Anthropic's docs say a file that only Bash commands changed isn't tracked and stays as it is. For most subagents, edits to files Claude hadn't already edited in your conversation stay too. Use Git to revert those.
Why does rewind say No files were restored? +
Anthropic's docs say Claude Code deletes a session's file snapshots in a retention sweep, by default about 30 days after the session last saved one. Rewinding to a checkpoint whose snapshots are gone can fail with that message. Set cleanupPeriodDays to keep snapshots longer.
Is Claude Code rewind a replacement for Git? +
No. Anthropic calls checkpoints quick, session-level recovery and says to keep using version control, such as Git, for commits, branches and long-term history.
How do I see what Claude Code actually ran? +
Press Ctrl+O to open the transcript viewer. Anthropic's docs say it shows detailed tool usage and execution, with a timestamp on each assistant message.
Can ReMynd undo what Claude Code changed? +
No. ReMynd's pages describe searching and reading your screen history, not restoring files. It helps you see what was on your screen in the window you were working in, after you installed it, like terminal output that scrolled past.