Checkpointing
--- a/checkpointing.md
+++ b/checkpointing.md
@@ -2,11 +2,11 @@
## How checkpoints work
-As you work with Claude, checkpointing automatically captures the state of your code before each prompt you send that starts a turn.
+A checkpoint is a restore point for the files Claude edits.
### Automatic tracking
-Claude Code tracks all changes made by its file editing tools:
+Claude Code tracks changes made by its file editing tools:
* Every prompt you send that starts a turn creates a new checkpoint
* Claude Code keeps file snapshots for the 100 most recent checkpoints in a session. Discarding an older checkpoint deletes the snapshot files that no remaining checkpoint references, except each file’s first snapshot.
@@ -28,7 +28,7 @@
* **Summarize up to here** : compress the conversation before this point into a summary, keeping later messages intact
* **Never mind** : return to the message list without making changes
-The two code restore options appear only when the selected checkpoint has tracked file changes to revert. If no file edits were captured after that point, the menu offers only **Restore conversation** , the summarize options, and **Never mind**. After restoring the conversation or choosing Summarize from here, the original prompt from the selected message is restored into the input field so you can re-send or edit it. Choosing Summarize up to here leaves you at the end of the conversation with the input empty. With either summarize option, a **Summarized conversation** marker appears in the conversation where the compressed messages were.
+The two code restore options appear only when the selected checkpoint has tracked file changes to revert. After restoring the conversation or choosing Summarize from here, the original prompt from the selected message is restored into the input field so you can re-send or edit it. Choosing Summarize up to here leaves you at the end of the conversation with the input empty. With either summarize option, a **Summarized conversation** marker appears in the conversation where the compressed messages were.
#### Rewound messages can return if you exit before your next prompt
@@ -66,9 +66,9 @@
* **Foreground forked skill** : a [skill with `context: fork`](</docs/en/skills#run-skills-in-a-subagent>) that runs in the foreground edits your working tree during your own turn, so rewinding restores its edits as usual. Set `background: false` to run a fork in the foreground; a few situations, [listed on the skills page](</docs/en/skills#run-skills-in-a-subagent>), run it there regardless of the setting.
* **Any other subagent** : rewinding restores only the files Claude had already edited in your conversation. The subagent’s edits to other files stay, so use version control, such as Git, to revert them. This includes a forked skill that runs in the background, the default, and a background [`/code-review --fix`](</docs/en/code-review-local>) run.
-### External changes not tracked
+### External changes can be lost
-Checkpointing only tracks files that have been edited within the current session. Manual changes you make to files outside of Claude Code and edits from other concurrent sessions are normally not captured, unless they happen to modify the same files as the current session.
+If Claude used its file editing tools on a file in your conversation, restoring code can discard changes you or another session made to that file after the selected checkpoint. Commit or copy the file yourself before you restore. Files that Claude’s file editing tools didn’t touch stay as they are.
### Messages sent mid-turn not checkpointed
--- a/checkpointing.md
+++ b/checkpointing.md
@@ -9,7 +9,7 @@
Claude Code tracks all changes made by its file editing tools:
* Every prompt you send that starts a turn creates a new checkpoint
- * Claude Code keeps file snapshots for the 100 most recent checkpoints in a session. Discarding an older checkpoint deletes the snapshot files that no remaining checkpoint references, except each file’s first snapshot, which the VS Code extension uses as the baseline for its session diffs.
+ * Claude Code keeps file snapshots for the 100 most recent checkpoints in a session. Discarding an older checkpoint deletes the snapshot files that no remaining checkpoint references, except each file’s first snapshot.
* Claude Code saves checkpoints with the conversation, so you can still run `/rewind` after you resume a session
* Claude Code deletes a session’s file snapshots in the [retention sweep](</docs/en/claude-directory#cleaned-up-automatically>), by default about 30 days after the session last saved one. Rewinding to a checkpoint whose snapshots are gone can fail with [`No files were restored`](</docs/en/errors#no-files-were-restored>). To keep snapshots longer, set [`cleanupPeriodDays`](</docs/en/settings-reference#cleanupperioddays>).
--- a/checkpointing.md
+++ b/checkpointing.md
@@ -17,7 +17,7 @@
Run `/rewind`, or press `Esc` twice when the prompt input is empty, to open the rewind menu.
-If the prompt input contains text, double `Esc` clears it instead of opening the menu. The cleared text is saved to your input history, so press `Up` to recall it after you finish in the rewind menu.
+In [vim mode](</docs/en/interactive-mode#vim-editor-mode>), press `Esc` twice from NORMAL mode. Outside vim mode, if the prompt input contains text, double `Esc` clears it instead of opening the menu. The cleared text is saved to your input history, so press `Up` to recall it after you finish in the rewind menu.
The rewind menu lists the prompts you sent during the session. Select the point you want to act on, then choose an action:
--- a/checkpointing.md
+++ b/checkpointing.md
@@ -1,4 +1,4 @@
-Claude Code automatically tracks Claude’s file edits as you work, allowing you to quickly undo changes and rewind to previous states if anything gets off track.
+Claude Code automatically tracks Claude’s file edits as you work. To undo edits, run `/rewind` or its alias `/undo` in your session to open the rewind menu.
## How checkpoints work
Show diff (155 lines)
--- a/checkpointing.md
+++ b/checkpointing.md
@@ -1,18 +1,10 @@
Claude Code automatically tracks Claude’s file edits as you work, allowing you to quickly undo changes and rewind to previous states if anything gets off track.
-##
-
-
-
-How checkpoints work
+## How checkpoints work
As you work with Claude, checkpointing automatically captures the state of your code before each prompt you send that starts a turn.
-###
-
-
-
-Automatic tracking
+### Automatic tracking
Claude Code tracks all changes made by its file editing tools:
@@ -21,11 +13,7 @@
* Claude Code saves checkpoints with the conversation, so you can still run `/rewind` after you resume a session
* Claude Code deletes a session’s file snapshots in the [retention sweep](</docs/en/claude-directory#cleaned-up-automatically>), by default about 30 days after the session last saved one. Rewinding to a checkpoint whose snapshots are gone can fail with [`No files were restored`](</docs/en/errors#no-files-were-restored>). To keep snapshots longer, set [`cleanupPeriodDays`](</docs/en/settings-reference#cleanupperioddays>).
-###
-
-
-
-Rewind and summarize
+### Rewind and summarize
Run `/rewind`, or press `Esc` twice when the prompt input is empty, to open the rewind menu.
@@ -42,37 +30,21 @@
The two code restore options appear only when the selected checkpoint has tracked file changes to revert. If no file edits were captured after that point, the menu offers only **Restore conversation** , the summarize options, and **Never mind**. After restoring the conversation or choosing Summarize from here, the original prompt from the selected message is restored into the input field so you can re-send or edit it. Choosing Summarize up to here leaves you at the end of the conversation with the input empty. With either summarize option, a **Summarized conversation** marker appears in the conversation where the compressed messages were.
-####
-
-
-
-Rewound messages can return if you exit before your next prompt
+#### Rewound messages can return if you exit before your next prompt
To remove the returned messages again, run `/rewind` in the session and select the same prompt, then **Restore conversation**. Before you exit, send Claude a prompt, because Claude Code saves the rewound conversation together with that prompt. Files you restored stay as the rewind left them.
-####
-
-
-
-Rewind past a cleared conversation
+#### Rewind past a cleared conversation
If you ran `/clear` earlier in the same Claude Code process, the rewind menu shows an additional entry at the top of the list labeled `/resume <session-id> (previous session)`. Select it to resume the conversation that was active before `/clear` ran. The entry is available until you exit Claude Code or resume a different session.
-####
-
-
-
-Guide a summary
+#### Guide a summary
Summarizing doesn’t change files on disk, and the original messages stay in the session transcript, so Claude can still reference the details. To guide what the summary focuses on, highlight a **Summarize** option with the arrow keys and type instructions where the row reads **add context (optional)** , then press `Enter`. Selecting the option with its number key summarizes immediately without instructions.
Summarize keeps you in the same session and compresses context, like a targeted `/compact`. To branch off and try a different approach while preserving the original session intact, use [`/branch`](</docs/en/sessions#branch-a-session>) or `claude --continue --fork-session` instead.
-##
-
-
-
-Common use cases
+## Common use cases
Checkpoints are particularly useful when:
@@ -81,68 +53,36 @@
* **Iterating on features** : experiment with variations knowing you can revert to working states
* **Freeing context space** : summarize a verbose debugging session from the midpoint forward, keeping your initial instructions intact
-##
+## Limitations
-
-
-Limitations
-
-###
-
-
-
-Bash command changes not tracked
+### Bash command changes not tracked
Once Claude has edited a file with its file editing tools in your conversation, `/rewind` undoes changes that Bash commands make to that file afterward. A file that only Bash commands changed isn’t tracked and stays as it is. To revert it, use version control, such as Git. Under each prompt, the rewind menu counts changes to files Claude had already edited, whatever made them. A prompt where a shell command changed such a file lists file changes too.
-###
-
-
-
-Subagent edits not restored
+### Subagent edits not restored
A [subagent](</docs/en/sub-agents>) makes edits with Claude’s file editing tools, but Claude Code usually doesn’t capture those edits in your session’s checkpoints. Whether rewinding restores them depends on how the subagent runs:
* **Foreground forked skill** : a [skill with `context: fork`](</docs/en/skills#run-skills-in-a-subagent>) that runs in the foreground edits your working tree during your own turn, so rewinding restores its edits as usual. Set `background: false` to run a fork in the foreground; a few situations, [listed on the skills page](</docs/en/skills#run-skills-in-a-subagent>), run it there regardless of the setting.
* **Any other subagent** : rewinding restores only the files Claude had already edited in your conversation. The subagent’s edits to other files stay, so use version control, such as Git, to revert them. This includes a forked skill that runs in the background, the default, and a background [`/code-review --fix`](</docs/en/code-review-local>) run.
-###
-
-
-
-External changes not tracked
+### External changes not tracked
Checkpointing only tracks files that have been edited within the current session. Manual changes you make to files outside of Claude Code and edits from other concurrent sessions are normally not captured, unless they happen to modify the same files as the current session.
-###
-
-
-
-Messages sent mid-turn not checkpointed
+### Messages sent mid-turn not checkpointed
In the rewind menu, a message you [typed while Claude was still working](</docs/en/interactive-mode#queue-messages-while-claude-works>) can be marked **No code restore**. The marked message has no checkpoint of its own. To undo the file edits Claude made after that message, select the prompt that started the turn and choose **Restore code** or **Restore code and conversation**. That reverts Claude’s file edits from the whole turn, including the ones from before your message arrived.
-###
-
-
-
-Symlinked and hard-linked paths not restored
+### Symlinked and hard-linked paths not restored
Checkpointing doesn’t rewind symlinked or hard-linked files. When you pick **Restore code** or **Restore code and conversation** from the `/rewind` menu, Claude Code skips any tracked path that is a symlink or hard link and shows a `Restored the code, but skipped N files` warning. The skipped files keep their current contents. To undo the session’s changes to one of them, ask Claude to reverse the edit or edit the file yourself. Config files a dotfile manager symlinks into your project and files pnpm hard-links into place both fall into this category. To see which paths a restore skips, turn on debug logging with `/debug` before you restore: the debug log at `~/.claude/debug/<session-id>.txt` names each skipped path. For every skip reason and the recovery steps, see [the skipped-files entry in the error reference](</docs/en/errors#restored-the-code-but-skipped-files>).
-###
-
-
-
-Not a replacement for version control
+### Not a replacement for version control
Checkpoints are designed for quick, session-level recovery. For permanent version history and collaboration, continue using version control, such as Git, for commits, branches, and long-term history.
-##
-
-
-
-See also
+## See also
* [Interactive mode](</docs/en/interactive-mode>) \- Keyboard shortcuts and session controls
* [Commands](</docs/en/commands>) \- Accessing checkpoints using `/rewind`
--- a/checkpointing.md
+++ b/checkpointing.md
@@ -120,7 +120,7 @@
Messages sent mid-turn not checkpointed
-In the rewind menu, a message you [typed while Claude was still working](</docs/en/interactive-mode#queue-messages-while-claude-works>) can be marked **No code restore**. Claude read that message before its turn ended. Checkpoints are taken for prompts that start a turn, so this message has none of its own. The edits Claude made after reading it count toward the prompt that started the turn. You don’t need to do anything about the message itself. To undo the file changes from that part of the session, select the prompt that started the turn and choose **Restore code** or **Restore code and conversation**. That reverts Claude’s file edits from the whole turn, including the ones from before your message arrived. Selecting the marked message still offers **Restore conversation** , which rewinds the conversation to it and leaves your files as they are.
+In the rewind menu, a message you [typed while Claude was still working](</docs/en/interactive-mode#queue-messages-while-claude-works>) can be marked **No code restore**. The marked message has no checkpoint of its own. To undo the file edits Claude made after that message, select the prompt that started the turn and choose **Restore code** or **Restore code and conversation**. That reverts Claude’s file edits from the whole turn, including the ones from before your message arrived.
###
--- a/checkpointing.md
+++ b/checkpointing.md
@@ -93,13 +93,7 @@
Bash command changes not tracked
-Checkpointing does not track files modified by Bash commands. For example, if Claude Code runs:
-
- rm file.txt
- mv old.txt new.txt
- cp source.txt dest.txt
-
-These file modifications cannot be undone through rewind. Only direct file edits made through Claude’s file editing tools are tracked.
+Once Claude has edited a file with its file editing tools in your conversation, `/rewind` undoes changes that Bash commands make to that file afterward. A file that only Bash commands changed isn’t tracked and stays as it is. To revert it, use version control, such as Git. Under each prompt, the rewind menu counts changes to files Claude had already edited, whatever made them. A prompt where a shell command changed such a file lists file changes too.
###
@@ -110,7 +104,7 @@
A [subagent](</docs/en/sub-agents>) makes edits with Claude’s file editing tools, but Claude Code usually doesn’t capture those edits in your session’s checkpoints. Whether rewinding restores them depends on how the subagent runs:
* **Foreground forked skill** : a [skill with `context: fork`](</docs/en/skills#run-skills-in-a-subagent>) that runs in the foreground edits your working tree during your own turn, so rewinding restores its edits as usual. Set `background: false` to run a fork in the foreground; a few situations, [listed on the skills page](</docs/en/skills#run-skills-in-a-subagent>), run it there regardless of the setting.
- * **Any other subagent** : rewinding restores only the files Claude had already edited in your conversation. The subagent’s edits to other files stay, so use git to revert them. This includes a forked skill that runs in the background, the default, and a background [`/code-review --fix`](</docs/en/code-review-local>) run.
+ * **Any other subagent** : rewinding restores only the files Claude had already edited in your conversation. The subagent’s edits to other files stay, so use version control, such as Git, to revert them. This includes a forked skill that runs in the background, the default, and a background [`/code-review --fix`](</docs/en/code-review-local>) run.
###
--- a/checkpointing.md
+++ b/checkpointing.md
@@ -41,6 +41,14 @@
* **Never mind** : return to the message list without making changes
The two code restore options appear only when the selected checkpoint has tracked file changes to revert. If no file edits were captured after that point, the menu offers only **Restore conversation** , the summarize options, and **Never mind**. After restoring the conversation or choosing Summarize from here, the original prompt from the selected message is restored into the input field so you can re-send or edit it. Choosing Summarize up to here leaves you at the end of the conversation with the input empty. With either summarize option, a **Summarized conversation** marker appears in the conversation where the compressed messages were.
+
+####
+
+
+
+Rewound messages can return if you exit before your next prompt
+
+To remove the returned messages again, run `/rewind` in the session and select the same prompt, then **Restore conversation**. Before you exit, send Claude a prompt, because Claude Code saves the rewound conversation together with that prompt. Files you restored stay as the rewind left them.
####
--- a/checkpointing.md
+++ b/checkpointing.md
@@ -102,7 +102,7 @@
A [subagent](</docs/en/sub-agents>) makes edits with Claude’s file editing tools, but Claude Code usually doesn’t capture those edits in your session’s checkpoints. Whether rewinding restores them depends on how the subagent runs:
* **Foreground forked skill** : a [skill with `context: fork`](</docs/en/skills#run-skills-in-a-subagent>) that runs in the foreground edits your working tree during your own turn, so rewinding restores its edits as usual. Set `background: false` to run a fork in the foreground; a few situations, [listed on the skills page](</docs/en/skills#run-skills-in-a-subagent>), run it there regardless of the setting.
- * **Any other subagent** : rewinding doesn’t restore the edits. Use git to revert them. This includes a forked skill that runs in the background, the default, and a background [`/code-review --fix`](</docs/en/code-review>) run.
+ * **Any other subagent** : rewinding restores only the files Claude had already edited in your conversation. The subagent’s edits to other files stay, so use git to revert them. This includes a forked skill that runs in the background, the default, and a background [`/code-review --fix`](</docs/en/code-review-local>) run.
###
--- a/checkpointing.md
+++ b/checkpointing.md
@@ -118,7 +118,7 @@
Messages sent mid-turn not checkpointed
-When a message you [queue while Claude works](</docs/en/interactive-mode#queue-messages-while-claude-works>) reaches Claude within the running turn, it joins that turn instead of starting a new one. The message appears in the conversation, but Claude Code doesn’t create a checkpoint for it. A queued message that Claude Code sends as part of a new turn gets a checkpoint as usual, including when several queued messages [share that turn](</docs/en/interactive-mode#when-claude-code-sends-what-you-queued>). To undo the edits Claude made after such a message, rewind to the prompt that started the turn. That rewinds the whole turn, including the work Claude did before your message arrived.
+In the rewind menu, a message you [typed while Claude was still working](</docs/en/interactive-mode#queue-messages-while-claude-works>) can be marked **No code restore**. Claude read that message before its turn ended. Checkpoints are taken for prompts that start a turn, so this message has none of its own. The edits Claude made after reading it count toward the prompt that started the turn. You don’t need to do anything about the message itself. To undo the file changes from that part of the session, select the prompt that started the turn and choose **Restore code** or **Restore code and conversation**. That reverts Claude’s file edits from the whole turn, including the ones from before your message arrived. Selecting the marked message still offers **Restore conversation** , which rewinds the conversation to it and leaves your files as they are.
###
--- a/checkpointing.md
+++ b/checkpointing.md
@@ -31,7 +31,7 @@
If the prompt input contains text, double `Esc` clears it instead of opening the menu. The cleared text is saved to your input history, so press `Up` to recall it after you finish in the rewind menu.
-The rewind menu lists each prompt you sent during the session, except messages that joined a running turn. Select the point you want to act on, then choose an action:
+The rewind menu lists the prompts you sent during the session. Select the point you want to act on, then choose an action:
* **Restore code and conversation** : revert both code and conversation to that point
* **Restore conversation** : rewind to that message while keeping current code
@@ -118,7 +118,7 @@
Messages sent mid-turn not checkpointed
-When a message you [queue while Claude works](</docs/en/interactive-mode#queue-messages-while-claude-works>) reaches Claude within the running turn, it joins that turn instead of starting a new one. The message appears in the conversation, but Claude Code doesn’t create a checkpoint for it, and the rewind menu doesn’t list it. A queued message that Claude Code sends as part of a new turn gets a checkpoint as usual, including when several queued messages [share that turn](</docs/en/interactive-mode#when-claude-code-sends-what-you-queued>). To remove such a message, or undo the edits Claude made after it, rewind to the prompt that started the turn. That rewinds the whole turn, including the work Claude did before your message arrived.
+When a message you [queue while Claude works](</docs/en/interactive-mode#queue-messages-while-claude-works>) reaches Claude within the running turn, it joins that turn instead of starting a new one. The message appears in the conversation, but Claude Code doesn’t create a checkpoint for it. A queued message that Claude Code sends as part of a new turn gets a checkpoint as usual, including when several queued messages [share that turn](</docs/en/interactive-mode#when-claude-code-sends-what-you-queued>). To undo the edits Claude made after such a message, rewind to the prompt that started the turn. That rewinds the whole turn, including the work Claude did before your message arrived.
###
--- a/checkpointing.md
+++ b/checkpointing.md
@@ -118,7 +118,7 @@
Messages sent mid-turn not checkpointed
-When a message you [queue while Claude works](</docs/en/interactive-mode#queue-messages-while-claude-works>) reaches Claude within the running turn, it joins that turn instead of starting a new one. The message appears in the conversation, but Claude Code doesn’t create a checkpoint for it, and the rewind menu doesn’t list it. A queued message that Claude Code sends as its own turn gets a checkpoint as usual. To remove such a message, or undo the edits Claude made after it, rewind to the prompt that started the turn. That rewinds the whole turn, including the work Claude did before your message arrived.
+When a message you [queue while Claude works](</docs/en/interactive-mode#queue-messages-while-claude-works>) reaches Claude within the running turn, it joins that turn instead of starting a new one. The message appears in the conversation, but Claude Code doesn’t create a checkpoint for it, and the rewind menu doesn’t list it. A queued message that Claude Code sends as part of a new turn gets a checkpoint as usual, including when several queued messages [share that turn](</docs/en/interactive-mode#when-claude-code-sends-what-you-queued>). To remove such a message, or undo the edits Claude made after it, rewind to the prompt that started the turn. That rewinds the whole turn, including the work Claude did before your message arrived.
###
--- a/checkpointing.md
+++ b/checkpointing.md
@@ -48,7 +48,7 @@
Rewind past a cleared conversation
-If you ran `/clear` earlier in the same Claude Code process, the rewind menu shows an additional entry at the top of the list labeled `/resume <session-id> (previous session)`. Select it to resume the conversation that was active before `/clear` ran. The entry is available until you exit Claude Code or resume a different session, and requires Claude Code v2.1.191 or later. On earlier versions, run `/resume` and pick the previous session from the list instead.
+If you ran `/clear` earlier in the same Claude Code process, the rewind menu shows an additional entry at the top of the list labeled `/resume <session-id> (previous session)`. Select it to resume the conversation that was active before `/clear` ran. The entry is available until you exit Claude Code or resume a different session.
####
--- a/checkpointing.md
+++ b/checkpointing.md
@@ -85,7 +85,7 @@
Bash command changes not tracked
-Checkpointing does not track files modified by bash commands. For example, if Claude Code runs:
+Checkpointing does not track files modified by Bash commands. For example, if Claude Code runs:
rm file.txt
mv old.txt new.txt
--- a/checkpointing.md
+++ b/checkpointing.md
@@ -6,7 +6,7 @@
How checkpoints work
-As you work with Claude, checkpointing automatically captures the state of your code before each user prompt.
+As you work with Claude, checkpointing automatically captures the state of your code before each prompt you send that starts a turn.
###
@@ -16,7 +16,7 @@
Claude Code tracks all changes made by its file editing tools:
- * Every user prompt creates a new checkpoint
+ * Every prompt you send that starts a turn creates a new checkpoint
* Claude Code keeps file snapshots for the 100 most recent checkpoints in a session. Discarding an older checkpoint deletes the snapshot files that no remaining checkpoint references, except each file’s first snapshot, which the VS Code extension uses as the baseline for its session diffs.
* Claude Code saves checkpoints with the conversation, so you can still run `/rewind` after you resume a session
* Claude Code deletes a session’s file snapshots in the [retention sweep](</docs/en/claude-directory#cleaned-up-automatically>), by default about 30 days after the session last saved one. Rewinding to a checkpoint whose snapshots are gone can fail with [`No files were restored`](</docs/en/errors#no-files-were-restored>). To keep snapshots longer, set [`cleanupPeriodDays`](</docs/en/settings-reference#cleanupperioddays>).
@@ -31,7 +31,7 @@
If the prompt input contains text, double `Esc` clears it instead of opening the menu. The cleared text is saved to your input history, so press `Up` to recall it after you finish in the rewind menu.
-The rewind menu lists each prompt you sent during the session. Select the point you want to act on, then choose an action:
+The rewind menu lists each prompt you sent during the session, except messages that joined a running turn. Select the point you want to act on, then choose an action:
* **Restore code and conversation** : revert both code and conversation to that point
* **Restore conversation** : rewind to that message while keeping current code
@@ -116,6 +116,14 @@
+Messages sent mid-turn not checkpointed
+
+When a message you [queue while Claude works](</docs/en/interactive-mode#queue-messages-while-claude-works>) reaches Claude within the running turn, it joins that turn instead of starting a new one. The message appears in the conversation, but Claude Code doesn’t create a checkpoint for it, and the rewind menu doesn’t list it. A queued message that Claude Code sends as its own turn gets a checkpoint as usual. To remove such a message, or undo the edits Claude made after it, rewind to the prompt that started the turn. That rewinds the whole turn, including the work Claude did before your message arrived.
+
+###
+
+
+
Symlinked and hard-linked paths not restored
Checkpointing doesn’t rewind symlinked or hard-linked files. When you pick **Restore code** or **Restore code and conversation** from the `/rewind` menu, Claude Code skips any tracked path that is a symlink or hard link and shows a `Restored the code, but skipped N files` warning. The skipped files keep their current contents. To undo the session’s changes to one of them, ask Claude to reverse the edit or edit the file yourself. Config files a dotfile manager symlinks into your project and files pnpm hard-links into place both fall into this category. To see which paths a restore skips, turn on debug logging with `/debug` before you restore: the debug log at `~/.claude/debug/<session-id>.txt` names each skipped path. For every skip reason and the recovery steps, see [the skipped-files entry in the error reference](</docs/en/errors#restored-the-code-but-skipped-files>).
--- a/checkpointing.md
+++ b/checkpointing.md
@@ -19,7 +19,7 @@
* Every user prompt creates a new checkpoint
* Claude Code keeps file snapshots for the 100 most recent checkpoints in a session. Discarding an older checkpoint deletes the snapshot files that no remaining checkpoint references, except each file’s first snapshot, which the VS Code extension uses as the baseline for its session diffs.
* Claude Code saves checkpoints with the conversation, so you can still run `/rewind` after you resume a session
- * Claude Code deletes checkpoints along with sessions after 30 days, following the [retention sweep rules](</docs/en/claude-directory#cleaned-up-automatically>); change the period with [`cleanupPeriodDays`](</docs/en/settings-reference#cleanupperioddays>)
+ * Claude Code deletes a session’s file snapshots in the [retention sweep](</docs/en/claude-directory#cleaned-up-automatically>), by default about 30 days after the session last saved one. Rewinding to a checkpoint whose snapshots are gone can fail with [`No files were restored`](</docs/en/errors#no-files-were-restored>). To keep snapshots longer, set [`cleanupPeriodDays`](</docs/en/settings-reference#cleanupperioddays>).
###
--- a/checkpointing.md
+++ b/checkpointing.md
@@ -19,7 +19,7 @@
* Every user prompt creates a new checkpoint
* Claude Code keeps file snapshots for the 100 most recent checkpoints in a session. Discarding an older checkpoint deletes the snapshot files that no remaining checkpoint references, except each file’s first snapshot, which the VS Code extension uses as the baseline for its session diffs.
* Claude Code saves checkpoints with the conversation, so you can still run `/rewind` after you resume a session
- * Claude Code deletes checkpoints along with sessions after 30 days, following the [retention sweep rules](</docs/en/claude-directory#cleaned-up-automatically>); change the period with [`cleanupPeriodDays`](</docs/en/settings#available-settings>)
+ * Claude Code deletes checkpoints along with sessions after 30 days, following the [retention sweep rules](</docs/en/claude-directory#cleaned-up-automatically>); change the period with [`cleanupPeriodDays`](</docs/en/settings-reference#cleanupperioddays>)
###
--- a/checkpointing.md
+++ b/checkpointing.md
@@ -120,8 +120,6 @@
Checkpointing doesn’t rewind symlinked or hard-linked files. When you pick **Restore code** or **Restore code and conversation** from the `/rewind` menu, Claude Code skips any tracked path that is a symlink or hard link and shows a `Restored the code, but skipped N files` warning. The skipped files keep their current contents. To undo the session’s changes to one of them, ask Claude to reverse the edit or edit the file yourself. Config files a dotfile manager symlinks into your project and files pnpm hard-links into place both fall into this category. To see which paths a restore skips, turn on debug logging with `/debug` before you restore: the debug log at `~/.claude/debug/<session-id>.txt` names each skipped path. For every skip reason and the recovery steps, see [the skipped-files entry in the error reference](</docs/en/errors#restored-the-code-but-skipped-files>).
-Before v2.1.216, `/rewind` wrote and deleted through links at tracked paths without a warning.
-
###
--- a/checkpointing.md
+++ b/checkpointing.md
@@ -19,7 +19,7 @@
* Every user prompt creates a new checkpoint
* Claude Code keeps file snapshots for the 100 most recent checkpoints in a session. Discarding an older checkpoint deletes the snapshot files that no remaining checkpoint references, except each file’s first snapshot, which the VS Code extension uses as the baseline for its session diffs.
* Claude Code saves checkpoints with the conversation, so you can still run `/rewind` after you resume a session
- * Claude Code deletes checkpoints along with sessions after 30 days; change the period with [`cleanupPeriodDays`](</docs/en/settings#available-settings>)
+ * Claude Code deletes checkpoints along with sessions after 30 days, following the [retention sweep rules](</docs/en/claude-directory#cleaned-up-automatically>); change the period with [`cleanupPeriodDays`](</docs/en/settings#available-settings>)
###
--- a/checkpointing.md
+++ b/checkpointing.md
@@ -6,7 +6,7 @@
How checkpoints work
-As you work with Claude, checkpointing automatically captures the state of your code before each user prompt. This safety net lets you pursue ambitious, wide-scale tasks knowing you can always return to a prior code state.
+As you work with Claude, checkpointing automatically captures the state of your code before each user prompt.
###
@@ -17,7 +17,7 @@
Claude Code tracks all changes made by its file editing tools:
* Every user prompt creates a new checkpoint
- * Claude Code keeps file snapshots for the 100 most recent checkpoints in a session. Discarding an older checkpoint deletes the snapshot files that no remaining checkpoint references, except each file’s first snapshot, which the VS Code extension uses as the baseline for its session diffs. Before v2.1.208, those superseded snapshot files stayed on disk until the session was cleaned up.
+ * Claude Code keeps file snapshots for the 100 most recent checkpoints in a session. Discarding an older checkpoint deletes the snapshot files that no remaining checkpoint references, except each file’s first snapshot, which the VS Code extension uses as the baseline for its session diffs.
* Claude Code saves checkpoints with the conversation, so you can still run `/rewind` after you resume a session
* Claude Code deletes checkpoints along with sessions after 30 days; change the period with [`cleanupPeriodDays`](</docs/en/settings#available-settings>)
@@ -99,7 +99,10 @@
Subagent edits not restored
-Except for a [skill with `context: fork`](</docs/en/skills#run-skills-in-a-subagent>) that runs in the foreground, edits a [subagent](</docs/en/sub-agents>) applies land outside your session’s checkpoints, so rewinding doesn’t restore them, even though the subagent makes them with Claude’s file editing tools. This includes a background [`/code-review --fix`](</docs/en/code-review>) run and any forked skill that runs in the background. Use git to revert those edits. The foreground fork edits your working tree during your own turn, so rewinding restores its edits as usual. A forked skill runs in the background by default; set `background: false` in its frontmatter to run it in the foreground, where the invoking turn waits for the result. Before v2.1.218, forked skills always ran in the foreground.
+A [subagent](</docs/en/sub-agents>) makes edits with Claude’s file editing tools, but Claude Code usually doesn’t capture those edits in your session’s checkpoints. Whether rewinding restores them depends on how the subagent runs:
+
+ * **Foreground forked skill** : a [skill with `context: fork`](</docs/en/skills#run-skills-in-a-subagent>) that runs in the foreground edits your working tree during your own turn, so rewinding restores its edits as usual. Set `background: false` to run a fork in the foreground; a few situations, [listed on the skills page](</docs/en/skills#run-skills-in-a-subagent>), run it there regardless of the setting.
+ * **Any other subagent** : rewinding doesn’t restore the edits. Use git to revert them. This includes a forked skill that runs in the background, the default, and a background [`/code-review --fix`](</docs/en/code-review>) run.
###
@@ -125,11 +128,7 @@
Not a replacement for version control
-Checkpoints are designed for quick, session-level recovery. For permanent version history and collaboration:
-
- * Continue using version control (ex. Git) for commits, branches, and long-term history
- * Checkpoints complement but don’t replace proper version control
- * Think of checkpoints as “local undo” and Git as “permanent history”
+Checkpoints are designed for quick, session-level recovery. For permanent version history and collaboration, continue using version control, such as Git, for commits, branches, and long-term history.
##
--- a/checkpointing.md
+++ b/checkpointing.md
@@ -18,8 +18,8 @@
* Every user prompt creates a new checkpoint
* Claude Code keeps file snapshots for the 100 most recent checkpoints in a session. Discarding an older checkpoint deletes the snapshot files that no remaining checkpoint references, except each file’s first snapshot, which the VS Code extension uses as the baseline for its session diffs. Before v2.1.208, those superseded snapshot files stayed on disk until the session was cleaned up.
- * Checkpoints are saved with the conversation, so a resumed session can still `/rewind` to them
- * Automatically cleaned up along with sessions after 30 days, configurable via [`cleanupPeriodDays`](</docs/en/settings#available-settings>)
+ * Claude Code saves checkpoints with the conversation, so you can still run `/rewind` after you resume a session
+ * Claude Code deletes checkpoints along with sessions after 30 days; change the period with [`cleanupPeriodDays`](</docs/en/settings#available-settings>)
###
--- a/checkpointing.md
+++ b/checkpointing.md
@@ -54,16 +54,11 @@
-Restore vs. summarize
+Guide a summary
-The restore options revert state: they undo code changes, conversation history, or both. The summarize options compress part of the conversation into an AI-generated summary without changing files on disk:
+Summarizing doesn’t change files on disk, and the original messages stay in the session transcript, so Claude can still reference the details. To guide what the summary focuses on, highlight a **Summarize** option with the arrow keys and type instructions where the row reads **add context (optional)** , then press `Enter`. Selecting the option with its number key summarizes immediately without instructions.
- * **Summarize from here** : messages before the selected message stay intact. The selected message and everything after it are replaced with a summary. Use this to discard a side discussion while keeping early context in full detail.
- * **Summarize up to here** : messages before the selected message are replaced with a summary. The selected message and everything after it stay intact, and you remain at the end of the conversation. Use this to compress early setup discussion while keeping recent work in full detail.
-
-In both cases the original messages are preserved in the session transcript, so Claude can reference the details if needed. To guide what the summary focuses on, highlight a **Summarize** option with the arrow keys and type instructions inline where the row reads **add context (optional)** , then press `Enter` to summarize; selecting the option by its number key summarizes immediately without instructions. This is similar to `/compact`, but targeted: instead of summarizing the entire conversation, you choose which side of the selected message to compress.
-
-Summarize keeps you in the same session and compresses context. If you want to branch off and try a different approach while preserving the original session intact, use [`/branch`](</docs/en/sessions#branch-a-session>) or `claude --continue --fork-session` instead.
+Summarize keeps you in the same session and compresses context, like a targeted `/compact`. To branch off and try a different approach while preserving the original session intact, use [`/branch`](</docs/en/sessions#branch-a-session>) or `claude --continue --fork-session` instead.
##
--- a/checkpointing.md
+++ b/checkpointing.md
@@ -102,6 +102,14 @@
+Subagent edits not restored
+
+Except for a [skill with `context: fork`](</docs/en/skills#run-skills-in-a-subagent>) that runs in the foreground, edits a [subagent](</docs/en/sub-agents>) applies land outside your session’s checkpoints, so rewinding doesn’t restore them, even though the subagent makes them with Claude’s file editing tools. This includes a background [`/code-review --fix`](</docs/en/code-review>) run and any forked skill that runs in the background. Use git to revert those edits. The foreground fork edits your working tree during your own turn, so rewinding restores its edits as usual. A forked skill runs in the background by default; set `background: false` in its frontmatter to run it in the foreground, where the invoking turn waits for the result. Before v2.1.218, forked skills always ran in the foreground.
+
+###
+
+
+
External changes not tracked
Checkpointing only tracks files that have been edited within the current session. Manual changes you make to files outside of Claude Code and edits from other concurrent sessions are normally not captured, unless they happen to modify the same files as the current session.
--- a/checkpointing.md
+++ b/checkpointing.md
@@ -110,6 +110,16 @@
+Symlinked and hard-linked paths not restored
+
+Checkpointing doesn’t rewind symlinked or hard-linked files. When you pick **Restore code** or **Restore code and conversation** from the `/rewind` menu, Claude Code skips any tracked path that is a symlink or hard link and shows a `Restored the code, but skipped N files` warning. The skipped files keep their current contents. To undo the session’s changes to one of them, ask Claude to reverse the edit or edit the file yourself. Config files a dotfile manager symlinks into your project and files pnpm hard-links into place both fall into this category. To see which paths a restore skips, turn on debug logging with `/debug` before you restore: the debug log at `~/.claude/debug/<session-id>.txt` names each skipped path. For every skip reason and the recovery steps, see [the skipped-files entry in the error reference](</docs/en/errors#restored-the-code-but-skipped-files>).
+
+Before v2.1.216, `/rewind` wrote and deleted through links at tracked paths without a warning.
+
+###
+
+
+
Not a replacement for version control
Checkpoints are designed for quick, session-level recovery. For permanent version history and collaboration:
--- a/checkpointing.md
+++ b/checkpointing.md
@@ -63,7 +63,7 @@
In both cases the original messages are preserved in the session transcript, so Claude can reference the details if needed. To guide what the summary focuses on, highlight a **Summarize** option with the arrow keys and type instructions inline where the row reads **add context (optional)** , then press `Enter` to summarize; selecting the option by its number key summarizes immediately without instructions. This is similar to `/compact`, but targeted: instead of summarizing the entire conversation, you choose which side of the selected message to compress.
-Summarize keeps you in the same session and compresses context. If you want to branch off and try a different approach while preserving the original session intact, use [fork](</docs/en/sessions#branch-a-session>) instead (`claude --continue --fork-session`).
+Summarize keeps you in the same session and compresses context. If you want to branch off and try a different approach while preserving the original session intact, use [`/branch`](</docs/en/sessions#branch-a-session>) or `claude --continue --fork-session` instead.
##
--- a/checkpointing.md
+++ b/checkpointing.md
@@ -19,7 +19,7 @@
* Every user prompt creates a new checkpoint
* Claude Code keeps file snapshots for the 100 most recent checkpoints in a session. Discarding an older checkpoint deletes the snapshot files that no remaining checkpoint references, except each file’s first snapshot, which the VS Code extension uses as the baseline for its session diffs. Before v2.1.208, those superseded snapshot files stayed on disk until the session was cleaned up.
* Checkpoints are saved with the conversation, so a resumed session can still `/rewind` to them
- * Automatically cleaned up along with sessions after 30 days (configurable)
+ * Automatically cleaned up along with sessions after 30 days, configurable via [`cleanupPeriodDays`](</docs/en/settings#available-settings>)
###
@@ -40,7 +40,7 @@
* **Summarize up to here** : compress the conversation before this point into a summary, keeping later messages intact
* **Never mind** : return to the message list without making changes
-After restoring the conversation or choosing Summarize from here, the original prompt from the selected message is restored into the input field so you can re-send or edit it. Choosing Summarize up to here leaves you at the end of the conversation with the input empty.
+The two code restore options appear only when the selected checkpoint has tracked file changes to revert. If no file edits were captured after that point, the menu offers only **Restore conversation** , the summarize options, and **Never mind**. After restoring the conversation or choosing Summarize from here, the original prompt from the selected message is restored into the input field so you can re-send or edit it. Choosing Summarize up to here leaves you at the end of the conversation with the input empty. With either summarize option, a **Summarized conversation** marker appears in the conversation where the compressed messages were.
####
@@ -61,7 +61,7 @@
* **Summarize from here** : messages before the selected message stay intact. The selected message and everything after it are replaced with a summary. Use this to discard a side discussion while keeping early context in full detail.
* **Summarize up to here** : messages before the selected message are replaced with a summary. The selected message and everything after it stay intact, and you remain at the end of the conversation. Use this to compress early setup discussion while keeping recent work in full detail.
-In both cases the original messages are preserved in the session transcript, so Claude can reference the details if needed. You can type optional instructions to guide what the summary focuses on. This is similar to `/compact`, but targeted: instead of summarizing the entire conversation, you choose which side of the selected message to compress.
+In both cases the original messages are preserved in the session transcript, so Claude can reference the details if needed. To guide what the summary focuses on, highlight a **Summarize** option with the arrow keys and type instructions inline where the row reads **add context (optional)** , then press `Enter` to summarize; selecting the option by its number key summarizes immediately without instructions. This is similar to `/compact`, but targeted: instead of summarizing the entire conversation, you choose which side of the selected message to compress.
Summarize keeps you in the same session and compresses context. If you want to branch off and try a different approach while preserving the original session intact, use [fork](</docs/en/sessions#branch-a-session>) instead (`claude --continue --fork-session`).
--- a/checkpointing.md
+++ b/checkpointing.md
@@ -17,6 +17,7 @@
Claude Code tracks all changes made by its file editing tools:
* Every user prompt creates a new checkpoint
+ * Claude Code keeps file snapshots for the 100 most recent checkpoints in a session. Discarding an older checkpoint deletes the snapshot files that no remaining checkpoint references, except each file’s first snapshot, which the VS Code extension uses as the baseline for its session diffs. Before v2.1.208, those superseded snapshot files stayed on disk until the session was cleaned up.
* Checkpoints are saved with the conversation, so a resumed session can still `/rewind` to them
* Automatically cleaned up along with sessions after 30 days (configurable)
--- a/checkpointing.md
+++ b/checkpointing.md
@@ -6,7 +6,7 @@
How checkpoints work
-As you work with Claude, checkpointing automatically captures the state of your code before each edit. This safety net lets you pursue ambitious, wide-scale tasks knowing you can always return to a prior code state.
+As you work with Claude, checkpointing automatically captures the state of your code before each user prompt. This safety net lets you pursue ambitious, wide-scale tasks knowing you can always return to a prior code state.
###
@@ -17,7 +17,7 @@
Claude Code tracks all changes made by its file editing tools:
* Every user prompt creates a new checkpoint
- * Checkpoints persist across sessions, so you can access them in resumed conversations
+ * Checkpoints are saved with the conversation, so a resumed session can still `/rewind` to them
* Automatically cleaned up along with sessions after 30 days (configurable)
###
--- a/checkpointing.md
+++ b/checkpointing.md
@@ -40,6 +40,14 @@
* **Never mind** : return to the message list without making changes
After restoring the conversation or choosing Summarize from here, the original prompt from the selected message is restored into the input field so you can re-send or edit it. Choosing Summarize up to here leaves you at the end of the conversation with the input empty.
+
+####
+
+
+
+Rewind past a cleared conversation
+
+If you ran `/clear` earlier in the same Claude Code process, the rewind menu shows an additional entry at the top of the list labeled `/resume <session-id> (previous session)`. Select it to resume the conversation that was active before `/clear` ran. The entry is available until you exit Claude Code or resume a different session, and requires Claude Code v2.1.191 or later. On earlier versions, run `/resume` and pick the previous session from the list instead.
####
--- a/checkpointing.md
+++ b/checkpointing.md
@@ -1,9 +1,3 @@
-> ## Documentation Index
->
-> Fetch the complete documentation index at: <https://code.claude.com/docs/llms.txt>
->
-> Use this file to discover all available pages before exploring further.
-
Claude Code automatically tracks Claude’s file edits as you work, allowing you to quickly undo changes and rewind to previous states if anything gets off track.
##
--- a/checkpointing.md
+++ b/checkpointing.md
@@ -32,7 +32,11 @@
Rewind and summarize
-Press `Esc` twice (`Esc` \+ `Esc`) or use the `/rewind` command to open the rewind menu. A scrollable list shows each of your prompts from the session. Select the point you want to act on, then choose an action:
+Run `/rewind`, or press `Esc` twice when the prompt input is empty, to open the rewind menu.
+
+If the prompt input contains text, double `Esc` clears it instead of opening the menu. The cleared text is saved to your input history, so press `Up` to recall it after you finish in the rewind menu.
+
+The rewind menu lists each prompt you sent during the session. Select the point you want to act on, then choose an action:
* **Restore code and conversation** : revert both code and conversation to that point
* **Restore conversation** : rewind to that message while keeping current code
--- a/checkpointing.md
+++ b/checkpointing.md
@@ -38,9 +38,10 @@
* **Restore conversation** : rewind to that message while keeping current code
* **Restore code** : revert file changes while keeping the conversation
* **Summarize from here** : compress the conversation from this point forward into a summary, freeing context window space
+ * **Summarize up to here** : compress the conversation before this point into a summary, keeping later messages intact
* **Never mind** : return to the message list without making changes
-After restoring the conversation or summarizing, the original prompt from the selected message is restored into the input field so you can re-send or edit it.
+After restoring the conversation or choosing Summarize from here, the original prompt from the selected message is restored into the input field so you can re-send or edit it. Choosing Summarize up to here leaves you at the end of the conversation with the input empty.
####
@@ -48,14 +49,12 @@
Restore vs. summarize
-The three restore options revert state: they undo code changes, conversation history, or both. “Summarize from here” works differently:
+The restore options revert state: they undo code changes, conversation history, or both. The summarize options compress part of the conversation into an AI-generated summary without changing files on disk:
- * Messages before the selected message stay intact
- * The selected message and all subsequent messages get replaced with a compact AI-generated summary
- * No files on disk are changed
- * The original messages are preserved in the session transcript, so Claude can reference the details if needed
+ * **Summarize from here** : messages before the selected message stay intact. The selected message and everything after it are replaced with a summary. Use this to discard a side discussion while keeping early context in full detail.
+ * **Summarize up to here** : messages before the selected message are replaced with a summary. The selected message and everything after it stay intact, and you remain at the end of the conversation. Use this to compress early setup discussion while keeping recent work in full detail.
-This is similar to `/compact`, but targeted: instead of summarizing the entire conversation, you keep early context in full detail and only compress the parts that are using up space. You can type optional instructions to guide what the summary focuses on.
+In both cases the original messages are preserved in the session transcript, so Claude can reference the details if needed. You can type optional instructions to guide what the summary focuses on. This is similar to `/compact`, but targeted: instead of summarizing the entire conversation, you choose which side of the selected message to compress.
Summarize keeps you in the same session and compresses context. If you want to branch off and try a different approach while preserving the original session intact, use [fork](</docs/en/sessions#branch-a-session>) instead (`claude --continue --fork-session`).
--- a/checkpointing.md
+++ b/checkpointing.md
@@ -57,7 +57,7 @@
This is similar to `/compact`, but targeted: instead of summarizing the entire conversation, you keep early context in full detail and only compress the parts that are using up space. You can type optional instructions to guide what the summary focuses on.
-Summarize keeps you in the same session and compresses context. If you want to branch off and try a different approach while preserving the original session intact, use [fork](</docs/en/how-claude-code-works#resume-or-fork-sessions>) instead (`claude --continue --fork-session`).
+Summarize keeps you in the same session and compresses context. If you want to branch off and try a different approach while preserving the original session intact, use [fork](</docs/en/sessions#branch-a-session>) instead (`claude --continue --fork-session`).
##
--- a/checkpointing.md
+++ b/checkpointing.md
@@ -1,3 +1,9 @@
+> ## Documentation Index
+>
+> Fetch the complete documentation index at: <https://code.claude.com/docs/llms.txt>
+>
+> Use this file to discover all available pages before exploring further.
+
Claude Code automatically tracks Claude’s file edits as you work, allowing you to quickly undo changes and rewind to previous states if anything gets off track.
##
--- a/checkpointing.md
+++ b/checkpointing.md
@@ -113,5 +113,5 @@
See also
* [Interactive mode](</docs/en/interactive-mode>) \- Keyboard shortcuts and session controls
- * [Built-in commands](</docs/en/commands>) \- Accessing checkpoints using `/rewind`
+ * [Commands](</docs/en/commands>) \- Accessing checkpoints using `/rewind`
* [CLI reference](</docs/en/cli-reference>) \- Command-line options
--- a/checkpointing.md
+++ b/checkpointing.md
@@ -80,12 +80,6 @@
Checkpointing does not track files modified by bash commands. For example, if Claude Code runs:
-Report incorrect code
-
-Copy
-
-Ask AI
-
rm file.txt
mv old.txt new.txt
cp source.txt dest.txt
Show diff (126 lines)
--- a/checkpointing.md
+++ b/checkpointing.md
@@ -0,0 +1,123 @@
+Claude Code automatically tracks Claude’s file edits as you work, allowing you to quickly undo changes and rewind to previous states if anything gets off track.
+
+##
+
+
+
+How checkpoints work
+
+As you work with Claude, checkpointing automatically captures the state of your code before each edit. This safety net lets you pursue ambitious, wide-scale tasks knowing you can always return to a prior code state.
+
+###
+
+
+
+Automatic tracking
+
+Claude Code tracks all changes made by its file editing tools:
+
+ * Every user prompt creates a new checkpoint
+ * Checkpoints persist across sessions, so you can access them in resumed conversations
+ * Automatically cleaned up along with sessions after 30 days (configurable)
+
+###
+
+
+
+Rewind and summarize
+
+Press `Esc` twice (`Esc` \+ `Esc`) or use the `/rewind` command to open the rewind menu. A scrollable list shows each of your prompts from the session. Select the point you want to act on, then choose an action:
+
+ * **Restore code and conversation** : revert both code and conversation to that point
+ * **Restore conversation** : rewind to that message while keeping current code
+ * **Restore code** : revert file changes while keeping the conversation
+ * **Summarize from here** : compress the conversation from this point forward into a summary, freeing context window space
+ * **Never mind** : return to the message list without making changes
+
+After restoring the conversation or summarizing, the original prompt from the selected message is restored into the input field so you can re-send or edit it.
+
+####
+
+
+
+Restore vs. summarize
+
+The three restore options revert state: they undo code changes, conversation history, or both. “Summarize from here” works differently:
+
+ * Messages before the selected message stay intact
+ * The selected message and all subsequent messages get replaced with a compact AI-generated summary
+ * No files on disk are changed
+ * The original messages are preserved in the session transcript, so Claude can reference the details if needed
+
+This is similar to `/compact`, but targeted: instead of summarizing the entire conversation, you keep early context in full detail and only compress the parts that are using up space. You can type optional instructions to guide what the summary focuses on.
+
+Summarize keeps you in the same session and compresses context. If you want to branch off and try a different approach while preserving the original session intact, use [fork](</docs/en/how-claude-code-works#resume-or-fork-sessions>) instead (`claude --continue --fork-session`).
+
+##
+
+
+
+Common use cases
+
+Checkpoints are particularly useful when:
+
+ * **Exploring alternatives** : try different implementation approaches without losing your starting point
+ * **Recovering from mistakes** : quickly undo changes that introduced bugs or broke functionality
+ * **Iterating on features** : experiment with variations knowing you can revert to working states
+ * **Freeing context space** : summarize a verbose debugging session from the midpoint forward, keeping your initial instructions intact
+
+##
+
+
+
+Limitations
+
+###
+
+
+
+Bash command changes not tracked
+
+Checkpointing does not track files modified by bash commands. For example, if Claude Code runs:
+
+Report incorrect code
+
+Copy
+
+Ask AI
+
+ rm file.txt
+ mv old.txt new.txt
+ cp source.txt dest.txt
+
+These file modifications cannot be undone through rewind. Only direct file edits made through Claude’s file editing tools are tracked.
+
+###
+
+
+
+External changes not tracked
+
+Checkpointing only tracks files that have been edited within the current session. Manual changes you make to files outside of Claude Code and edits from other concurrent sessions are normally not captured, unless they happen to modify the same files as the current session.
+
+###
+
+
+
+Not a replacement for version control
+
+Checkpoints are designed for quick, session-level recovery. For permanent version history and collaboration:
+
+ * Continue using version control (ex. Git) for commits, branches, and long-term history
+ * Checkpoints complement but don’t replace proper version control
+ * Think of checkpoints as “local undo” and Git as “permanent history”
+
+##
+
+
+
+See also
+
+ * [Interactive mode](</docs/en/interactive-mode>) \- Keyboard shortcuts and session controls
+ * [Built-in commands](</docs/en/commands>) \- Accessing checkpoints using `/rewind`
+ * [CLI reference](</docs/en/cli-reference>) \- Command-line options