In short.
This Claude Code documentation page explains session recovery for developers using the assistant, but checkpoint coverage and retention limit what it can restore. It documents /rewind and /undo, separate restoration of code and conversation, and two ways to summarize selected conversation ranges. File snapshots cover the 100 most recent checkpoints, with cleanup by default about 30 days after a session last saved a snapshot. Shell-only changes, most subagent edits and linked files need particular care. Actual restoration reliability and summary quality are not assessed.
Researched and written by an AI model and checked by a second AI model. How it works
Coverage is the complete selected page at [https://code.claude.com/docs/en/checkpointing.md], including automatic tracking, restoration, summaries, persistence behavior, use cases and all stated limitations. The documentation-index notice and references to related documentation do not expand that scope. Linked settings, retention, error, session, skill and command pages are excluded. Their detailed requirements and recovery procedures are unknown beyond statements reproduced on the selected page. No commands, restores or summarization operations were executed.
The overview
Identity
Checkpointing is a Claude Code documentation guide at [https://code.claude.com/docs/en/checkpointing.md]. It describes a built-in session feature for restoring tracked file changes, rewinding conversation history and compressing conversation context. The resource is instructional documentation, with no separate downloadable tool supplied on the page.
Assessment
The guide is useful when experimenting with implementations, recovering from unwanted assistant edits or reducing a long debugging conversation. Its strongest practical detail is explaining exactly where recovery stops: a checkpoint is not a complete backup of every project change. Developers who combine assistant edits with shell commands, background agents or concurrent work should read the limitations before depending on a restore.
Users
The audience is developers already working in Claude Code. Beginners get concrete commands and menu choices for undoing changes. Experienced users get details about snapshot retention, foreground and background subagents, linked paths and queued messages. The page assumes familiarity with a Claude Code session and does not teach installation or Git fundamentals.
Capabilities
The rewind menu can restore code and conversation together, restore conversation while keeping current code, or restore code while keeping the discussion. Code-restore choices appear only when the selected checkpoint has tracked changes to revert. Summarize from here compresses the selected point forward; Summarize up to here compresses earlier conversation while preserving later messages.
Summaries accept optional instructions about what to retain and add a Summarized conversation marker. Checkpoints remain available after resuming a saved session, subject to snapshot retention. After /clear in the same Claude Code process, the menu also offers the previous session until Claude Code exits or another session is resumed.
Using it
Requirements
The instructions assume an existing Claude Code session. File restoration requires tracked edits and retained snapshots for the selected checkpoint. The page does not specify a minimum Claude Code version, operating system requirements, installation commands, account eligibility or model requirements. A conversation rewind can remain available even when there are no tracked file changes to restore.
Mechanism
Each prompt that starts a turn creates a checkpoint before that turn's work. Claude Code tracks changes made through its file-editing tools and keeps file snapshots for the 100 most recent checkpoints. When an older checkpoint is discarded, snapshots no remaining checkpoint references are deleted, except each file's first snapshot, which supports session diffs in the VS Code extension.
Checkpoints are saved with the conversation. A retention sweep deletes session snapshots by default about 30 days after the session last saved a snapshot; cleanupPeriodDays can extend retention. Missing snapshots can cause restoration to fail. Summarization changes conversation context without changing files on disk, and the page says original messages remain in the session transcript.
Setup
Tracking is automatic; the page describes no separate activation step. Enter /rewind or its alias /undo to open the menu, select a prompt and choose the intended action. Pressing Esc twice also opens it when the prompt input is empty.
In vim mode, double Esc must be pressed from NORMAL mode. Outside vim mode, double Esc clears nonempty input instead; Up retrieves that cleared text from input history. To guide a summary, highlight a summarize option with the arrow keys, enter optional context and press Enter. Selecting its number key summarizes immediately without instructions.
Example
For an illustrative scenario, suppose Claude edits ordinary project files during a refactor and you decide to abandon those changes while retaining the discussion. Open /rewind, select the prompt that started the refactor and choose Restore code, if offered. Inspect the resulting files, particularly any files touched only by shell commands or other agents. This scenario is an explanation of the documented procedure; it was not executed.
Assessment & evidence
Limitations
A file changed only through Bash is not tracked. Once Claude has edited a file through its file-editing tools, rewind also undoes subsequent Bash changes to that file. Manual edits and edits from concurrent sessions are normally outside coverage unless they affect files already tracked in the current session.
Foreground forked skills are a documented exception to the usual subagent limitation: their edits are restored normally. Other subagents restore only files Claude had already edited in the main conversation. This restriction includes background forked skills, which run in the background by default, and background /code-review --fix operations.
Symlinked and hard-linked files are skipped during code restoration and retain their current contents. The restore displays a skipped-file warning. Enabling /debug before restoring records skipped paths in ~/.claude/debug/<session-id>.txt; the page suggests reversing those edits explicitly or editing the files manually.
Messages sent while Claude is already working have no checkpoint of their own and may show No code restore. Restoring from the prompt that started the turn reverts tracked edits from the whole turn, including edits made before the mid-turn message arrived. Snapshot expiration imposes a separate limit on recovery.
Practical tradeoffs
The separate restore choices let developers preserve useful discussion while discarding edits, or preserve current code while changing conversation history. Their independence also requires care: restoring conversation leaves files unchanged, so returning to an earlier message does not establish that the project matches that earlier moment. The documented file exceptions imply that every restore needs a review of the resulting project state.
Alternatives
The page recommends Git for permanent history, branches and collaboration. It describes targeted summarization as similar to /compact. To explore another approach while preserving the original session, it points to /branch or claude --continue --fork-session. These alternatives are mentioned on the selected page, but their full instructions and any broader product comparisons are outside its coverage.
Evidence
The evidence consists of the complete selected Checkpointing documentation page at [https://code.claude.com/docs/en/checkpointing.md]. It supports the described commands, menu behavior, retention rules and exceptions as documented behavior. No execution results, restoration tests, summary-quality measurements or independent reliability evidence are supplied.
Access & freshness
Costs
The page provides no Claude Code pricing, subscription requirements or billing details for summarization. It also gives no disk-space estimates for retained snapshots. Product costs and any additional charges associated with these operations are unknown from this evidence.
Rights
The selected page states no documentation licence, software licence or redistribution permission. It does not establish permission to republish the full guide or distribute Claude Code. Those rights remain unknown from this source.
Freshness
The page was captured on 2026-11-24 at 21:10:21.774 UTC. It states no Claude Code release number or page-update date. Compatibility with a particular installed release and changes after that capture remain unknown.
Using the guide
Before restoring, identify whether you want to change files, conversation history or both, and check for shell-only files, subagent edits and linked paths. Keep Git history for changes that need durable recovery. After restoring, inspect the resulting files and run the project's relevant checks; no validation results are established by this guide.
After restoring conversation, send a prompt before exiting so the rewound conversation is saved; otherwise removed messages can return. Restored files stay as the rewind left them. Restoring conversation or summarizing from a selected point returns that point's original prompt to the input field, while summarizing up to a point leaves you at the conversation's end with empty input.
