Skip to content
BENIBIX Learn

enableFileCheckpointing Option

Also known as rewindFiles, Agent SDK file checkpointing, Claude Agent SDK enableFileCheckpointing

The option that lets you put files back the way they were.

Think of it like

It is like going back to a saved page in a game.

Example

Mia's agent rewrote a module badly. She calls rewindFiles with the ID of the prompt before it, and the old files come back.

Why it matters

Agents make wrong edits, and an undo for files makes it safe to let them try.

Definition

enableFileCheckpointing is the Agent SDK option that backs up files before the agent changes them, so you can roll them back. It covers the Write, Edit and NotebookEdit tools, not shell commands. Each prompt is a checkpoint, named by its message ID. Pass that ID to rewindFiles to put the files back. The chat stays as it is.

Common mistake

Expecting it to undo a shell command. Changes made through Bash are not tracked.

Key takeaways

  1. 1
    Backs up before edits. Write, Edit, NotebookEdit.
  2. 2
    Not shell commands. Bash is untracked.
  3. 3
    Files, not chat. Chat stays.

Compare