Solo Stack Kits Directory
Claude Code workflows & skills for solo consultants and freelancers

← Blog · 2026-10-27

Claude Code /rewind Not Working? 9 Causes and Fixes for Checkpoints

30-second test: run /rewind and pick the prompt before things went wrong. If the menu only offers Restore conversation and the summarize options, Claude Code has no tracked file edits after that point: start at cause 1. If it says No files were restored, go to cause 6. If it says Restored the code, but skipped N files, go to cause 7. And whatever happens, git status and git diff tell you what's really on disk.

Checkpoints are Claude Code's built-in undo. Before each prompt you send that starts a turn, it snapshots the files its file-editing tools are about to change, and /rewind (or Esc twice on an empty prompt) puts them back. Most "rewind is broken" reports aren't bugs. The change you wanted undone was made some way that checkpoints don't track.

What the rewind menu offers

Pick a prompt from the list, then one of these:

Option What it does
Restore code and conversation Reverts tracked files and the conversation to that point
Restore conversation Rewinds the chat but leaves files as they are now
Restore code Reverts tracked files but keeps the conversation
Summarize from here / Summarize up to here Compresses part of the conversation to free context. Files on disk don't change
Never mind Back to the list, nothing changed

The two code options only appear when the selected checkpoint has tracked file changes to revert. A common mix-up: Restore conversation and both summarize options never touch your files.

9 causes, in the order to check them

  1. Bash made the change, not Claude's edit tools. A file that only shell commands changed (a sed, a formatter, npm install, a code generator, rm) isn't tracked, so /rewind leaves it as it is. There's one exception: once Claude has edited a file with its file-editing tools in your conversation, later Bash changes to that same file are undone too. For everything else, use Git: git diff to see the change and git restore <file> (or git checkout -- <file>) to undo it.
  2. A subagent made the edits. Claude Code usually doesn't capture subagent edits in your session's checkpoints. Rewinding restores only files Claude had already edited in your own conversation, and the subagent's edits to other files stay. That includes background forked skills (the default for a skill with context: fork) and a background /code-review --fix run. A forked skill running in the foreground (background: false) edits during your own turn, so its edits rewind normally.
  3. You, your editor or another session changed the file. Checkpointing only tracks files edited within the current session. Manual edits, an IDE's auto-format on save, and edits from another Claude Code session running in the same folder normally aren't captured, unless they touch the same files this session edited.
  4. The message you picked was typed mid-turn. A message you queued while Claude was still working can show No code restore in the menu, because it has no checkpoint of its own. Select the prompt that started that turn instead and choose Restore code. That reverts Claude's edits from the whole turn, including the ones made before your message arrived.
  5. Checkpointing is switched off. In /config, Rewind code (checkpoints) controls the fileCheckpointingEnabled setting, which is on by default. Check your user, project and local settings files for "fileCheckpointingEnabled": false, and your shell for CLAUDE_CODE_DISABLE_FILE_CHECKPOINTING, which turns it off for one session. Whichever one turns it off, the other can't turn it back on. Headless -p runs ignore the setting entirely: there's no rewind menu there, and file checkpointing needs CLAUDE_CODE_ENABLE_SDK_FILE_CHECKPOINTING=true (or enableFileCheckpointing in the Agent SDK).
  6. No files were restored: the backups are gone or the file is locked. Each file needs the backup saved before Claude edited it. Claude Code deletes a session's backups in its retention sweep, by default about 30 days after the session last saved one, so an old session you /resume still lists its checkpoints but can't restore them. A fork made with /branch or --fork-session copies the backups, and a copy that failed (for example on a full disk) is missing in the fork. Also check file permissions: if Claude Code can't write or delete the file, fix that and run /rewind again. When the backups are gone, running it again fails the same way, so recover from Git or ask Claude to reverse its edits. To keep backups longer, raise cleanupPeriodDays (default 30) in settings. On versions before v2.1.260, missing backups were skipped silently and the rewind looked like it worked.
  7. Restored the code, but skipped N files: links. Since v2.1.216, a code restore skips any tracked path that is (or became) a symlink, hard link or other non-regular file, whose directory changed since the checkpoint, or whose backup can't be safely read. Skipped files keep their current contents. Config files that a dotfile manager symlinks into your project and files pnpm hard-links into place are the usual culprits. The message only gives a count; run /debug before your next restore and the log at ~/.claude/debug/<session-id>.txt names each path, or find links yourself with find . -type l and find . -type f -links +1. Undo those by hand or ask Claude to reverse the edit.
  8. The checkpoint is older than the last 100. Claude Code keeps file snapshots for the 100 most recent checkpoints in a session. In a very long session, the earliest prompts may no longer have snapshots to restore.
  9. Rewound messages came back after you quit. If you rewind the conversation and exit before sending another prompt, the rewound messages can return when you resume. Run /rewind, pick the same prompt, choose Restore conversation, then send Claude a prompt before you exit, because Claude Code saves the rewound conversation together with that prompt. Files you restored stay as the rewind left them.

Two things rewind does that people miss

Make undo boring: pair checkpoints with Git

Anthropic is explicit that checkpoints are for quick, session-level recovery and not a replacement for version control. A habit that covers every gap above: commit (or git stash) before you hand Claude a big task, so Bash changes, subagent edits and expired backups can all be undone with git restore or git reset. If you aren't comfortable with Git, at least run git init and commit once in each project folder; git diff then shows exactly what changed.

If /rewind fails because the session itself broke, for example an API error on every turn, see Claude Code API errors or Claude Code stuck or not responding. If you rewind mostly to free space rather than undo edits, Claude Code context filling up fast has nine fixes.


Facts on this page come from Anthropic's Claude Code docs on checkpointing, the error reference and the settings reference. This guide isn't affiliated with Anthropic.

Want it set up already? Claude Code Power Config Pack

Fixed it? Skip the next one with a tested Claude Code setup you can drop into any repo.

One install command that backs up your settings first. Checked against the official Claude Code docs. MIT licensed.

Launch price: $6 instead of $12 (code LAUNCH50, first 25 buyers, until Nov 10, 2026).

Get the Config Pack: $6 launch priceOr try 2 of the hooks free

Free on Gumroad: block-dangerous-bash and protect-secrets with a settings snippet. Enter $0; Gumroad asks for an email to deliver the zip.

Prefer to build it yourself? Use the free Claude Code tools, no sign-up.