Checkpoint

A checkpoint is an automatic save of your files’ state that Claude Code makes with every new message you send. With /rewind, or by pressing Esc twice, you can take the code, the conversation or both back to that moment. Checkpoints track only the changes made by Claude’s file editing tools, and they don’t replace git.

A point saved automatically before Claude changes files. You can go back to it, like “Undo”, but it doesn’t replace git.

You’ll also find it as: checkpoints

How it shows up in Claude Code

You don’t have to do anything: every message you send creates a checkpoint. When something goes wrong, type /rewind or press Esc twice with the input box empty. A list of your messages opens; you pick the moment and then what to restore: “Restore code and conversation”, “Restore conversation” (only the conversation) or “Restore code” (only the files). Checkpoints are saved with the session, so you can still go back after resuming it the next day.

Example

You asked Claude to change the site’s colors and you don’t like the result at all. Instead of explaining how to undo everything, you type:

/rewind

You pick the message from before the color change and choose “Restore code”. The files go back to how they were, while the conversation stays, so you can try another approach.

Common mistakes

  • Relying on checkpoints instead of git. The documentation is clear: for permanent history and teamwork you use git. When something works, make a commit.
  • Forgetting what isn’t tracked. Files deleted, moved or copied through terminal commands (for example rm or mv) can’t be restored from a checkpoint. Neither can changes you make yourself outside Claude Code.
  • Subagents. Changes made by most subagents aren’t undone by /rewind; use git for those.

Related terms and where you learn it

A checkpoint complements git and commit; it doesn’t replace them. The /rewind menu can also summarize part of the conversation, like /compact. You learn it in the lesson “How do you go back in time if something went wrong?” in module 04, The working method, step by step.

Source: Claude Code documentation: Checkpointing

How it appears in the course

You do. Checkpoints don’t replace git.

How do you go back in time if something went wrong? · Module 04, The working method, step by step

Learn Claude Code from zero, in plain English

12 modules with 1–2 minute lessons, which you can also do on your phone. The first two modules are free.