Checkpointing changedcheckpointing
Upstream edited this page at 28 Nov 2026 18:57 UTC, give or take a minute or two: the time comes from Anthropic’s own sitemap rather than from a commit. This site recorded the change at 28 Nov 2026 19:07 UTC.
Upstream edited
Recorded here
Lines+5added
Lines−5removed
From line
6
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits20to this page, all time
### External changes can be lost ### External changes not tracked
The whole hunk
from line 6, old and new numbered
/
from line 6
66
77## How checkpoints work
88
9As you work with Claude, checkpointing automatically captures the state of your code before each prompt you send that starts a turn.
9A checkpoint is a restore point for the files Claude edits.
1010
1111### Automatic tracking
1212
13Claude Code tracks all changes made by its file editing tools:
13Claude Code tracks changes made by its file editing tools:
1414
1515* Every prompt you send that starts a turn creates a new checkpoint
1616* 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.
from line 34
3434* **Summarize up to here**: compress the conversation before this point into a summary, keeping later messages intact
3535* **Never mind**: return to the message list without making changes
3636
37The 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**.
37The two code restore options appear only when the selected checkpoint has tracked file changes to revert.
3838
3939After 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.
4040
from line 80
8080* **Foreground forked skill**: a [skill with `context: fork`](https://code.claude.com/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](https://code.claude.com/docs/en/skills.md#run-skills-in-a-subagent), run it there regardless of the setting.
8181* **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`](https://code.claude.com/docs/en/code-review-local) run.
8282
83### External changes not tracked
83### External changes can be lost
8484
85Checkpointing 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.
85If 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.
8686
8787### Messages sent mid-turn not checkpointed
8888
No line in this hunk matches that.