How to Use Checkpoints in Claude Code
Claude Code v2.0.0 introduced the /rewind command, a built-in checkpoint system that allows you to restore code and conversation to previous states without relying on git. This integrated solution provides instant rollback for both professional developers and vibe coders who may be unfamiliar with version control systems.
How to Use It
Run the /rewind command during any Claude Code session to open the checkpoint interface:
/rewind
Each checkpoint entry displays three key pieces of information:
- User prompt - The original request that triggered the changes
- Affected files - Which files were modified at that checkpoint
- Line count diffs - Change summary showing
+additions -deletions
Checkpoint Workflow
Use checkpoints strategically for safe experimentation and recovery:
Checkpoint Strategy:
- Run
/rewindto view available restore points - Review the list of changes with file diffs
- Select the checkpoint to restore to
- Confirm with restoration mode selection:
Restore code and conversation- Complete rollback of both statesRestore conversation- Revert conversation without changing codeRestore code- Revert code without affecting conversation
- The conversation forks at the selected checkpoint
The separation between code state and context state provides precise control over what gets restored. When you select a checkpoint, the UI shows the original message and timestamp, indicating whether code or conversation has changed since that point.
Important: Rewinding does not affect files edited manually or via bash commands. It only restores changes made by Claude Code during the session.
Built-in Version Control
The checkpoint system operates independently of git, making it accessible to all users regardless of version control experience. Professional developers benefit from instant session-level rollback without git overhead, while vibe coders get safety nets without learning git commands.
Benefits of Integrated Checkpoints:
- No Git Required - Works immediately without repository initialization or
gitknowledge - Session-Level Rollback - Undo changes within your Claude Code session instantly
- Lower Barrier - Vibe coders experiment safely without version control complexity
- Complementary Tool - Professional developers use checkpoints for rapid iteration alongside
gitfor commits - Automatic Tracking - Every change creates a checkpoint without manual intervention
The /rewind command allows me to experiment more safely with Claude Code. Previously, I continuously staged or made git commits before asking Claude to perform tasks that might lead to hallucinations or errors. Checkpoints eliminate this friction by providing instant rollback without git overhead, enabling fearless experimentation during active development sessions.
See Also: Session Management|Terminal Controls|How to Suspend Claude Code

