Beginner 2 min read

Checkpoints

Save and restore conversation states

Prerequisites

  • Basic Claude Code usage

What You'll Learn

  • Save checkpoints at key moments
  • Restore to any saved state
  • Branch from checkpoints to explore
  • Use undo for quick rollbacks

StartEdit fileRun testsFix bugNowContext building up: 3 files edited, 12 tests run...Conversation has valuable state worth preservingYour session builds up context as you work
01/05
0:00 / 0:21

Checkpoint Commands

/checkpointCmd+S

Save current state as a new checkpoint

/checkpoints

List all saved checkpoints

/restore [id]

Restore to a specific checkpoint

/undoCmd+Z

Go back to the previous checkpoint

What Checkpoints Save

Captured

  • Full conversation history and context
  • All tool calls and their results
  • File modifications made during session
  • Current working directory state
  • Environment and configuration

Not Captured

  • External system state (databases, APIs)
  • Running processes or servers
  • Git commits already pushed
  • Files outside the project directory

When to Use Checkpoints

🛡️

Before Risky Changes

Save before refactoring, dependency updates, or experimental changes

🔀

At Decision Points

Save when you have multiple valid approaches to try

⚙️

After Setup Work

Save after complex configuration so you can return to a clean state

🎬

Before Demos

Save a working state to restore if something goes wrong

Checkpoints vs Git

FeatureCheckpointsGit
Saves conversation✓ Full context✗ No
Saves file changes✓ Session changes✓ Committed changes
Team sharing~ Local only✓ Remote repos
Best forExploration & experimentationPermanent history

Use checkpoints for exploratory work, then commit to git when you're happy with the result.

💡 Pro Tips

  • 1.Name your checkpoints descriptively—/checkpoint "before refactor" is easier to find later.
  • 2.Checkpoints are cheap—create them liberally before any significant change.
  • 3.Use /undo for quick rollbacks, /restore for jumping to specific points.
  • 4.Combine with git: checkpoint before experimenting, commit after succeeding.

Master Claude Code faster

Get notified when new animated guides are released.

Subscribe to the newsletter