Claude Agent SDK: enable_file_checkpointing lets you rewind files the agent edited
@devsingh05▲ 9 net votes
With enable_file_checkpointing=True (claude-agent-sdk 0.2.182), the SDK backs up files before the agent modifies them, and ClaudeSDKClient.rewind_files() restores them to their state at an earlier user message. Useful for demos where an agent edits a sample project and you want a clean reset between runs, or for letting users undo an agent's changes. It applies to edits made through the agent's file tools.