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
01/05
0:00 / 0:21
Checkpoint Commands
/checkpointCmd+SSave current state as a new checkpoint
/checkpointsList all saved checkpoints
/restore [id]Restore to a specific checkpoint
/undoCmd+ZGo 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
| Feature | Checkpoints | Git |
|---|---|---|
| Saves conversation | ✓ Full context | ✗ No |
| Saves file changes | ✓ Session changes | ✓ Committed changes |
| Team sharing | ~ Local only | ✓ Remote repos |
| Best for | Exploration & experimentation | Permanent 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
/undofor quick rollbacks,/restorefor 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