Files
Luong NGUYEN 8f045173d1 docs: sync to Claude Code v2.1.212 (#154)
* docs: sync to Claude Code v2.1.212

Bumps tutorial coverage from the v2.1.206 baseline (2026-07-11 sync) to
v2.1.212, plus a repo-internal accuracy audit that surfaced defects
independent of the version delta.

Fixed:
- Dead `#` memory-shortcut removed from 02-memory/README.md (two places
  documented a discontinued quick-memory-add pattern as working, directly
  contradicting the file's own commands table)
- Auto mode opt-in -> opt-out on Bedrock/Vertex/Foundry (v2.1.207)
- `auto` permission mode mislabeled "Research Preview" across
  09-advanced-features/README.md, CATALOG.md, README.md, and the vi/ja/zh/uk
  translations (auto mode is GA, gated only by plan/model/provider)
- `/fork` / `/branch` history corrected: they were a single aliased command
  only from v2.1.77 to v2.1.161, not "renamed" as previously stated
- `effort` frontmatter enum in 04-subagents/README.md completed with `xhigh`
- Bundled-skills count reconciled in CATALOG.md (9 -> 10)
- INDEX.md Skills section count and Feature Coverage Matrix Total column
  fully recomputed and reconciled (Skills: 22, Plugins: 39)
- Stale 2.1.160 footer cluster (5 files) bumped to 2.1.212
- QUICK_REFERENCE.md fully resynced (was 52 versions behind)
- 02-memory/README.md's Memory Hierarchy section rewritten: replaced a
  fabricated 8-tier strict-precedence model with the verified structure
  (CLAUDE.md files are concatenated into context, not overridden; 4 real
  location tiers; rules and auto memory are separate mechanisms)
- 02-memory/README.md's Memory Architecture diagram no longer conflates
  claude.ai's 24h synthesis cycle with Claude Code's continuous auto memory
- Import recursion depth corrected (was documented as 5, actually 4 hops)

Added:
- Subagent output scanning (v2.1.210) documented in 04-subagents/README.md
- Session-wide spawn caps (v2.1.212): WebSearch and subagent limits
- MCP long-running-tool auto-backgrounding (v2.1.212) in 05-mcp/README.md
- `claude auto-mode reset` and `/resume` picker (v2.1.212)
- Screen reader mode (v2.1.208): --ax-screen-reader / CLAUDE_AX_SCREEN_READER
- Task tool `mode` parameter deprecation note (v2.1.212)

Known gaps (deferred, not fixed this pass):
- 03-skills/blog-draft/ vs 03-skills/.claude/skills/blog-draft/: confirmed
  the latter is gitignored local testing scratch, not a repo duplicate

* fix(INDEX): correct Skills row arithmetic and stale changelog notes

INDEX.md's Skills header/matrix shipped as 22 (5+9+8) despite the PR's
own CHANGELOG claiming it was fixed to 21 — three independent counts
(file-type breakdown, filesystem listing, changelog intent) agree on
21; the Docs column was off by one. Also removes two stale CHANGELOG
"Known gaps" entries this same PR already resolved (memory hierarchy
rewrite, blog-draft gitignore confirmation) and adds the missing
Fixed-section bullet documenting the memory hierarchy rewrite.
2026-07-18 22:21:21 +07:00
..

Claude How To

Checkpoints and Rewind

Checkpoints allow you to save conversation state and rewind to previous points in your Claude Code session. This is invaluable for exploring different approaches, recovering from mistakes, or comparing alternative solutions.

Overview

Checkpoints allow you to save conversation state and rewind to previous points, enabling safe experimentation and exploration of multiple approaches. They are snapshots of your conversation state, including:

  • All messages exchanged
  • File modifications made
  • Tool usage history
  • Session context

Checkpoints are invaluable when exploring different approaches, recovering from mistakes, or comparing alternative solutions.

Key Concepts

Concept Description
Checkpoint Snapshot of conversation state including messages, files, and context
Rewind Return to a previous checkpoint, discarding subsequent changes
Branch Point Checkpoint from which multiple approaches are explored

Accessing Checkpoints

You can access and manage checkpoints in two primary ways:

Using Keyboard Shortcut

Press Esc twice (Esc + Esc) to open the checkpoint interface and browse saved checkpoints.

Using Slash Command

Use the /rewind command (alias: /checkpoint) for quick access:

# Open rewind interface
/rewind

# Or use the alias
/checkpoint

Rewind Options

When you rewind, you are presented with a menu of six options:

  1. Restore code and conversation -- Revert both files and messages to that checkpoint
  2. Restore conversation -- Rewind messages only, keep your current code as-is
  3. Restore code -- Revert file changes only, keep the full conversation history
  4. Summarize from here -- Compress the conversation from this point forward into an AI-generated summary, freeing context window space. Messages before the selected point stay intact. No files on disk are changed. The original messages are preserved in the session transcript. You can optionally provide instructions to focus the summary on specific topics.
  5. Summarize up to here -- The backward counterpart: compress everything before the selected point into an AI-generated summary, keeping the messages from this point forward intact. Together with "Summarize from here" this gives you bidirectional, targeted compaction of your context window. No files on disk are changed, and the original messages are preserved in the session transcript.
  6. Never mind -- Cancel and return to the current state

Note

: After restoring the conversation or summarizing, the original prompt from the selected message is restored into the input field so you can re-send or edit it.

/clear is no longer a hard boundary (v2.1.191+): /rewind can resume from a checkpoint taken before you ran /clear. Clearing the conversation no longer permanently discards the state that preceded it — you can rewind back across the clear if you need that earlier code or context again.

Automatic Checkpoints

Claude Code automatically creates checkpoints for you:

  • Every user prompt - A new checkpoint is created with each user input
  • Persistent - Checkpoints persist across sessions
  • Auto-cleaned - Checkpoints are automatically cleaned up after 30 days

This means you can always rewind to any previous point in your conversation, from a few minutes ago to days before.

Use Cases

Scenario Workflow
Exploring Approaches Save → Try A → Save → Rewind → Try B → Compare
Safe Refactoring Save → Refactor → Test → If fail: Rewind
A/B Testing Save → Design A → Save → Rewind → Design B → Compare
Mistake Recovery Notice issue → Rewind to last good state

Using Checkpoints

Viewing and Rewinding

Press Esc twice or use /rewind to open the checkpoint browser. You'll see a list of all available checkpoints with timestamps. Select any checkpoint to rewind to that state.

Checkpoint Details

Each checkpoint shows:

  • Timestamp of when it was created
  • Files that were modified
  • Number of messages in the conversation
  • Tools that were used

Practical Examples

Example 1: Exploring Different Approaches

User: Let's add a caching layer to the API

Claude: I'll add Redis caching to your API endpoints...
[Makes changes at checkpoint A]

User: Actually, let's try in-memory caching instead

Claude: I'll rewind to explore a different approach...
[User presses Esc+Esc and rewinds to checkpoint A]
[Implements in-memory caching at checkpoint B]

User: Now I can compare both approaches

Example 2: Recovering from Mistakes

User: Refactor the authentication module to use JWT

Claude: I'll refactor the authentication module...
[Makes extensive changes]

User: Wait, that broke the OAuth integration. Let's go back.

Claude: I'll help you rewind to before the refactoring...
[User presses Esc+Esc and selects the checkpoint before the refactor]

User: Let's try a more conservative approach this time

Example 3: Safe Experimentation

User: Let's try rewriting this in a functional style
[Creates checkpoint before experiment]

Claude: [Makes experimental changes]

User: The tests are failing. Let's rewind.
[User presses Esc+Esc and rewinds to the checkpoint]

Claude: I've rewound the changes. Let's try a different approach.

Example 4: Branching Approaches

User: I want to compare two database designs
[Takes note of checkpoint - call it "Start"]

Claude: I'll create the first design...
[Implements Schema A]

User: Now let me go back and try the second approach
[User presses Esc+Esc and rewinds to "Start"]

Claude: Now I'll implement Schema B...
[Implements Schema B]

User: Great! Now I have both schemas to choose from

Checkpoint Retention

Claude Code automatically manages your checkpoints:

  • Checkpoints are created automatically with every user prompt
  • Old checkpoints are retained for up to 30 days
  • Checkpoints are cleaned up automatically to prevent unlimited storage growth

Workflow Patterns

Branching Strategy for Exploration

When exploring multiple approaches:

1. Start with initial implementation → Checkpoint A
2. Try Approach 1 → Checkpoint B
3. Rewind to Checkpoint A
4. Try Approach 2 → Checkpoint C
5. Compare results from B and C
6. Choose best approach and continue

Safe Refactoring Pattern

When making significant changes:

1. Current state → Checkpoint (auto)
2. Start refactoring
3. Run tests
4. If tests pass → Continue working
5. If tests fail → Rewind and try different approach

Best Practices

Since checkpoints are created automatically, you can focus on your work without worrying about manually saving state. However, keep these practices in mind:

Using Checkpoints Effectively

Do:

  • Review available checkpoints before rewinding
  • Use rewind when you want to explore different directions
  • Keep checkpoints to compare different approaches
  • Understand what each rewind option does (restore code and conversation, restore conversation, restore code, or summarize)

Don't:

  • Rely on checkpoints alone for code preservation
  • Expect checkpoints to track external file system changes
  • Use checkpoints as a substitute for git commits

Configuration

Checkpoints are a built-in default behavior in Claude Code and do not require any configuration to enable. Every user prompt automatically creates a checkpoint.

The only checkpoint-related setting is cleanupPeriodDays, which controls how long sessions and checkpoints are retained:

{
  "cleanupPeriodDays": 30
}
  • cleanupPeriodDays: Number of days to retain session history and checkpoints (default: 30)

v2.1.117 update: cleanupPeriodDays now governs retention for four on-disk caches, not just checkpoints:

  • Session checkpoints
  • ~/.claude/tasks/ — persistent task lists
  • ~/.claude/shell-snapshots/ — captured shell-environment snapshots
  • ~/.claude/backups/ — rolling setting / CLAUDE.md backups

A single setting now prunes all four directories uniformly after the same number of days.

Limitations

Checkpoints have the following limitations:

  • Bash command changes NOT tracked - Operations like rm, mv, cp on the filesystem are not captured in checkpoints
  • External changes NOT tracked - Changes made outside Claude Code (in your editor, terminal, etc.) are not captured
  • Not a replacement for version control - Use git for permanent, auditable changes to your codebase

Troubleshooting

Missing Checkpoints

Problem: Expected checkpoint not found

Solution:

  • Check if checkpoints were cleared
  • Check disk space
  • Ensure cleanupPeriodDays is set high enough (default: 30 days)

Rewind Failed

Problem: Cannot rewind to checkpoint

Solution:

  • Ensure no uncommitted changes conflict
  • Check if checkpoint is corrupted
  • Try rewinding to a different checkpoint

Integration with Git

Checkpoints complement (but don't replace) git:

Feature Git Checkpoints
Scope File system Conversation + files
Persistence Permanent Session-based
Granularity Commits Any point
Speed Slower Instant
Sharing Yes Limited

Use both together:

  1. Use checkpoints for rapid experimentation
  2. Use git commits for finalized changes
  3. Create checkpoint before git operations
  4. Commit successful checkpoint states to git

Quick Start Guide

Basic Workflow

  1. Work normally - Claude Code creates checkpoints automatically
  2. Want to go back? - Press Esc twice or use /rewind
  3. Choose checkpoint - Select from the list to rewind
  4. Select what to restore - Choose from restore code and conversation, restore conversation, restore code, summarize from here, or cancel
  5. Continue working - You're back at that point

Keyboard Shortcuts

  • Esc + Esc - Open checkpoint browser
  • /rewind - Alternative way to access checkpoints
  • /checkpoint - Alias for /rewind

Knowing When to Rewind: Context Monitoring

Checkpoints let you go back — but how do you know when you should? As your conversation grows, Claude's context window fills up and model quality silently degrades. You might be shipping code from a half-blind model without realizing it.

cc-context-stats solves this by adding real-time context zones to your Claude Code status bar. It tracks where you are in the context window — from Plan (green, safe to plan and code) through Code (yellow, avoid starting new plans) to Dump (orange, finish up and rewind). When you see the zone shift, you know it's time to checkpoint and start fresh instead of pushing through with degraded output.

Additional Resources

Summary

Checkpoints are an automatic feature in Claude Code that lets you safely explore different approaches without fear of losing work. Every user prompt creates a new checkpoint automatically, so you can rewind to any previous point in your session.

Key benefits:

  • Experiment fearlessly with multiple approaches
  • Quickly recover from mistakes
  • Compare different solutions side-by-side
  • Integrate safely with version control systems

Remember: checkpoints are not a replacement for git. Use checkpoints for rapid experimentation and git for permanent code changes.


Last Updated: July 11, 2026 Claude Code Version: 2.1.206 Sources: