File checkpointing is how Claude Code keeps copies of files so that edits can be undone with /rewind. When Claude Code is run through the SDK, the toolkit for building programs on top of it, checkpointing is turned on only when both of these are true:
CLAUDE_CODE_ENABLE_SDK_FILE_CHECKPOINTINGis set.CLAUDE_CODE_DISABLE_FILE_CHECKPOINTINGis not set.
Both are environment variables, named values you set in your shell before starting Claude Code. This check was moved into one place in the code. The rule itself looks the same as before.
If you want checkpointing in an SDK session, set the first variable and make sure the second is not set.
The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.
* Fixed `/rewind` sometimes restoring an older version of a file when two queued prompts, or stacked skills, ran together right after a turn that changed itchangelog see the edit
Anthropic's documentation has since written up /rewind, on Claude Code changelog.