Answer: Calling `rewindFiles()` (TypeScript) or `rewind_files()` (Python) restores files on disk to a previous state at a checkpoint, deleting files Claude Code created and restoring modified files to their content at that point; it does not rewind the conversation itself. Status: Confirmed Entry: tool/claude-code/agents-and-automation/rewind-files-to-previous-state Revision: 2 Digest: sha256:1092f3604602f367 (changes whenever the content changes) Timeline: Created: 2026-11-13T03:02:43Z Last changed: 2026-11-14T12:12:10Z (Rewind behavior: — → Claude Code deletes the files it created and restores the files it modified to their content at that point) Last verified: 2026-11-20T12:16:35Z Next check: 2026-11-21T12:16:35Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of TypeScript function | rewindFiles() | [1] | 2026-11-20 Python function | rewind_files() | [1] | 2026-11-20 Restore point | its user message's UUID is the restore point | [1] | 2026-11-20 Rewind behavior | Claude Code deletes the files it created and restores the files it modified to their content at that point | [1] | 2026-11-20 Skipped paths field | skippedLinks | [1] | 2026-11-20 Skipping version requirement | v2.1.216 | [1] | 2026-11-20 Sources: [1] Anthropic. "Rewind file changes with checkpointing". https://code.claude.com/docs/en/agent-sdk/file-checkpointing.md Role: primary. Accessed: 2026-11-20T12:16:35Z Quote: "calling `rewindFiles()` (TypeScript) or `rewind_files()` (Python)" (Supports: TypeScript function, Python function) Quote: "Each prompt that starts a turn is a checkpoint, and its user message's UUID is the restore point." (Supports: Restore point) Quote: "When you rewind to a checkpoint, Claude Code deletes the files it created and restores the files it modified to their content at that point." (Supports: Rewind behavior) Quote: "counts every skipped path in its `skippedLinks` field" (Supports: Skipped paths field) Quote: "Skipping requires Claude Code v2.1.216 or later; before v2.1.216, a rewind wrote and deleted through links at tracked paths." (Supports: Skipping version requirement) Published: 2026-11-20T03:01:08Z Snapshot SHA-256: 004c69ad606b2e96872840ecf1a1bb63068e55c29a488d351ba2d38fba3ca760 (captured 2026-11-14T12:12:09Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-14T12:12:10Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T12:16:35Z. No independent second source is configured for this entry Last successful check: 2026-11-20T12:16:35Z Last attempt: 2026-11-20T12:16:35Z Notes and limitations: Extracted automatically from a single official source (section "How checkpointing works"). Related: https://latestn.com/tool/claude-code/agents-and-automation/run-bundled-workflow How do I run a bundled workflow in Claude Code? https://latestn.com/tool/claude-code/agents-and-automation/run-non-interactively How do I run Claude Code non-interactively from the command line? https://latestn.com/tool/claude-code/agents-and-automation/run-plugin-evals-in-ci How do I run Claude Code plugin evals in CI and gate on the score? https://latestn.com/tool/claude-code/agents-and-automation/resume-across-hosts How do I resume a Claude Code SDK session across different hosts? https://latestn.com/tool/claude-code/agents-and-automation/resume-session-by-id How do I resume a Claude Code SDK session by its session ID? https://latestn.com/tool/claude-code/agents-and-automation/resume-session-from-store How do I resume a Claude Code Agent SDK session from an external session store? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-14T12:12:10Z | changed | Rewind behavior: — → Claude Code deletes the files it created and restores the files it modified to their content at that point | [1] 2026-11-14T12:12:10Z | changed | Restore point: — → its user message's UUID is the restore point | [1] 2026-11-14T12:12:10Z | changed | Restore point identifier: checkpoint UUID → — | [1] 2026-11-13T03:02:43Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/claude-code/agents-and-automation/rewind-files-to-previous-state/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/claude-code/agents-and-automation/rewind-files-to-previous-state POST: https://latestn.com/dispute/tool/claude-code/agents-and-automation/rewind-files-to-previous-state with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/claude-code/agents-and-automation/rewind-files-to-previous-state?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I rewind files to a previous state in Claude Code using rewindFiles()? Revision 2, last verified 2026-11-20T12:16:35Z. https://latestn.com/tool/claude-code/agents-and-automation/rewind-files-to-previous-state (accessed 2026-11-21T10:07:14Z). @misc{LatestN_tool_claude_code_agents_and_automation_rewind_files_to_previous_state_r2, title = {How do I rewind files to a previous state in Claude Code using rewindFiles()?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/claude-code/agents-and-automation/rewind-files-to-previous-state}}, note = {Revision 2; digest sha256:1092f3604602f367; last verified 2026-11-20T12:16:35Z; accessed 2026-11-21T10:07:14Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/claude-code/agents-and-automation/rewind-files-to-previous-state