Skip to content

/checkpoint

Save and restore conversation context using git-based checkpoints. Enables session recovery and state preservation for complex, multi-session work.

Terminal window
/checkpoint [operation] [name] [flags]

Create a checkpoint of current state:

Terminal window
/checkpoint save [name]

Process:

  1. Create git stash with descriptive message
  2. Record current context (files being worked on, task state)
  3. Save checkpoint metadata to .claude/checkpoints/[name].json

Metadata Format:

{
"name": "feature-auth",
"created": "2024-01-15T14:30:00Z",
"git_stash": "stash@{0}",
"files_in_context": ["src/auth/login.ts", "src/auth/token.ts"],
"current_task": "Implementing JWT refresh",
"notes": "User-provided notes"
}

Show available checkpoints:

Terminal window
/checkpoint list

Output:

## Available Checkpoints
| Name | Created | Task | Stash |
|------|---------|------|-------|
| feature-auth | 2h ago | JWT refresh | stash@{0} |
| bugfix-login | 1d ago | Login timeout | stash@{1} |

Restore a previous checkpoint:

Terminal window
/checkpoint restore [name]

Process:

  1. Apply git stash
  2. Load checkpoint metadata
  3. Summarize restored context
  4. Ready to continue work

Remove a checkpoint:

Terminal window
/checkpoint delete [name]
FlagDescription
--notes="[text]"Add notes to checkpoint
--forceOverwrite existing checkpoint
--include-uncommittedInclude uncommitted changes
--dry-runShow what would be saved
Terminal window
# Save current state
/checkpoint save auth-progress
# Save with notes
/checkpoint save auth --notes="WIP: implementing token refresh"
# Show all checkpoints
/checkpoint list
# Restore a checkpoint
/checkpoint restore auth-progress
# Remove old checkpoint
/checkpoint delete old-checkpoint
# Preview what will be saved
/checkpoint save feature-x --dry-run

For complex tasks, checkpoints are automatically suggested:

  • Before major refactoring
  • When switching contexts
  • Before risky operations
  • At natural breakpoints
  1. Name Descriptively: Use task-related names (e.g., auth-oauth-integration)
  2. Add Notes: Future you will thank present you
  3. Checkpoint Often: Before context switches or risky changes
  4. Clean Up: Delete obsolete checkpoints regularly

When resuming work after a break:

Terminal window
# 1. See what checkpoints exist
/checkpoint list
# 2. Restore the relevant context
/checkpoint restore feature-auth
# 3. Continue where you left off
# Context is loaded, files are restored
Terminal window
# End of day 1
/checkpoint save oauth-day1 --notes="Completed user model, starting token service"
# Start of day 2
/checkpoint restore oauth-day1
Terminal window
# Before trying risky refactor
/checkpoint save before-refactor
# If refactor doesn't work out
/checkpoint restore before-refactor
Terminal window
# Save current work
/checkpoint save feature-payments
# Switch to urgent bug
/fix "login timeout issue"
# Return to feature work
/checkpoint restore feature-payments
  • Checkpoints use git stash (requires git repository)
  • Large uncommitted changes may be slow to save/restore
  • Metadata stored in .claude/checkpoints/
  • Consider committing before checkpointing for safety
  • /load - Load specific components
  • /status - Check current project status
  • /spawn - Launch parallel tasks