Rewind file changes with checkpointing changedagent-sdk/file-checkpointing
Nearest release: v2.1.309, published 2 hours before upstream edited the page. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Upstream edited this page at 22 Oct 2026 22:51 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 22 Oct 2026 23:07 UTC.
Upstream edited
Recorded here
Lines+2added
Lines−2removed
From line
6
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits11to this page, all time
The whole hunk
from line 6, old and new numbered
/
from line 6
66
77> [!WARNING]
88>
9> Only changes made through the Write, Edit, and NotebookEdit tools are tracked. Changes made through Bash commands (like `echo > file.txt` or `sed -i`) are not captured by the checkpoint system, and neither are edits a [subagent](/docs/en/agent-sdk/subagents.md) applies, except a [skill with `context: fork`](/docs/en/skills#run-skills-in-a-subagent) that runs in the foreground.
9> `rewindFiles()` doesn't undo what `sed -i` or another Bash command did to a file, unless a tool such as Write or Edit had modified that file in the main conversation. [Subagent](/docs/en/agent-sdk/subagents.md) edits aren't tracked, while edits from a [skill with `context: fork`](/docs/en/skills#run-skills-in-a-subagent) running in the foreground are.
1010
1111## How checkpointing works
1212
from line 601
601601
602602| Limitation | Description |
603603| - | - |
604| Write/Edit/NotebookEdit tools only | Changes made through Bash commands are not tracked |
604| Bash command changes | Rewinding doesn't undo changes a Bash command made, except in files the main conversation had already edited with a tool such as Write or Edit |
605605| Subagent edits | Edits a [subagent](/docs/en/agent-sdk/subagents.md) applies aren't tracked, except a skill with `context: fork` running in the foreground. A rewind reverts them only in files the main conversation had already edited; use git to revert the rest |
606606| Same session | Checkpoints are tied to the session that created them |
607607| File content only | Creating, moving, or deleting directories is not undone by rewinding |
No line in this hunk matches that.