What this thread does
Anthropic's 2.1.311 notes correct the warning that manual/Bash edits are never affected, and the checkpointing docs distinguish already-tracked files from shell-only files; this corrects a warning, not a newly announced general-purpose undo feature (checked 2026-11-17).
The problem
The agent deleted or overwrote files and you hope /rewind brings them back. Sometimes it does, and sometimes it silently cannot.
What the sources say
The official checkpointing page (read 18 October 2026):
- Every prompt that starts a turn creates a checkpoint of Claude's file edits; snapshots are kept for the 100 most recent checkpoints and deleted by the retention sweep about 30 days after the session last saved one (
cleanupPeriodDaysextends that)./rewindor double Esc opens the menu: restore code and conversation, conversation only, code only, or summarize. - Not tracked: files changed only by Bash commands (
rm,mv,cp), edits by most subagents to previously untracked files, and symlinked or hard-linked files. Later Bash, manual or other-session changes to files already tracked by Claude's editing tools can be affected by a code restore, per the current docs linked above. - The page itself says checkpoints are not a replacement for version control.
A r/ClaudeCode thread titled about Claude deleting a whole project (posted 8 May 2026 by u/JuniorRow1247 as an image post) shows what readers say: the highest comments were "use source control" and "why haven't you committed even once", with others asking about backups and remotes. The story is the poster's; I could not read the image.
How to apply it
1. Treat /rewind as undo for tracked files only. After an rm, mv or script run, it may help for a file Claude already tracked; shell-only files remain outside tracking, so keep version control and backups. 2. Make git the real checkpoint: start each task on a branch and commit before the agent starts.
git switch -c agent/<task>
git add -A && git commit -m "WIP: before agent <task>"
3. Ask the agent to commit after each green step (small commits make a git revert or git reset to a known point cheap); put that in CLAUDE.md as a rule, and back it with a hook if you need certainty. 4. Push the branch to a remote. A deleted working directory does not delete the remote copy. 5. Keep the untracked data that git does not hold (databases, uploads, .env) in a separate backup. 6. If rewind says no files were restored, the snapshots may have expired; check cleanupPeriodDays, and note that Claude Code 2.1.319 (6 November 2026) fixes this error for checkpoints from before /branch.
Mistakes to check
- Assuming every subagent's edits rewind with yours; the docs say foreground
context: forkskills restore normally, while other subagents restore only files Claude had already edited in your conversation. - Working for hours with nothing committed; this was the main complaint in the thread.
- Committing only into the same directory the agent can delete; push it.
Limits
Not run by me. Checkpoint behaviour is from Anthropic's docs as of the read date; the thread is anecdotal.
Sources
Primary source: Claude Code docs, Checkpointing (Anthropic, read in full on 18 October 2026).
- Confirms every checkpoint claim above: a checkpoint per prompt that starts a turn; snapshots for the 100 most recent checkpoints; deletion in the retention sweep about 30 days after the session last saved one, extendable with
cleanupPeriodDays;/rewindor double Esc with the restore and summarize options; the earlier review treated Bash changes such asrm,mvandcp, most subagent edits, and external or concurrent-session edits as excluded; the current docs above qualify that exclusion for already-tracked files, while symlinked and hard-linked files remain excluded; and the docs' own line that checkpoints are not a replacement for version control. - Not covered by the docs: the Reddit incident and the commit-first, branch-and-push routine. That advice is the commenters' and mine, consistent with the docs' version-control note but not stated by Anthropic in those words.
Started from a post by @JuniorRow1247, packaged by the editor. Original post