Checkpoints

Eleven·2026년 4월 16일

Hello, Claude Code

목록 보기
10/11

요약

Checkpoint는 Claude Code 세션의 대화 상태와 코드 파일을 자동으로 저장하고, 언제든 이전 시점으로 되돌릴 수 있는 기능이다. 설정이 전혀 필요 없고, 매 프롬프트마다 자동으로 생성된다.


개념 정리

가장 중요한 특징 — 설정 불필요

Checkpoints는 Claude Code의 기본 내장 동작이다. 별도 설정 없이 매 사용자 프롬프트마다 자동으로 새 체크포인트가 생성된다.

내가 뭔가 입력할 때마다 → 자동으로 체크포인트 생성
설정이나 명령어 없이도 항상 되돌아갈 수 있음

체크포인트에 저장되는 것

대화 내용 (메시지 히스토리)
    +
코드 파일 상태 (Claude가 수정한 파일들)
    =
그 시점의 완전한 스냅샷

되돌리는 방법

# 방법 1: 키보드 단축키
Esc + Esc      # 체크포인트 브라우저 열기

# 방법 2: 커맨드
/rewind        # 동일한 동작
/checkpoint    # 위의 alias (같은 기능)

되돌릴 때 선택지 5가지

1. Restore code and conversation  → 코드 + 대화 모두 되돌림
2. Restore conversation           → 대화만 되돌림, 코드는 현재 상태 유지
3. Restore code                   → 코드만 되돌림, 대화는 현재 상태 유지
4. Summarize from here            → 이 시점부터 요약
5. Never mind                     → 취소

실제 사용 패턴 3가지

패턴 1 — 두 가지 접근 방식 비교

1. 현재 상태 → 체크포인트 A (자동 생성)
2. Redis 캐싱 구현 → 체크포인트 B
3. Esc+Esc → 체크포인트 A로 되돌아가기
4. 인메모리 캐싱 구현 → 체크포인트 C
5. B와 C 비교 → 더 나은 방식 선택

패턴 2 — 안전한 리팩토링

1. 현재 상태 → 자동 체크포인트
2. 리팩토링 시작
3. 테스트 실행
4. 테스트 통과 → 계속 진행
5. 테스트 실패 → Esc+Esc → 되돌아가기

패턴 3 — Planning Mode와 조합

/plan 기능 구현해줘
→ 계획 검토 후 승인
→ 각 단계마다 자동 체크포인트 생성
→ 중간에 잘못되면 원하는 단계로 되돌아가기

다른 기능들과의 관계

Planning Mode   →  실행 전 계획 검토
Checkpoints     →  실행 중 언제든 되돌리기
Hooks           →  실행 후 품질 강제 검증

세 가지가 합쳐지면 "계획 → 실행 → 검증 → 문제 시 롤백"의 안전한 개발 루프가 완성된다.


핵심 요약 (TL;DR)

  • Checkpoints는 설정 불필요 — 매 프롬프트마다 자동 생성
  • Esc + Esc 또는 /rewind로 언제든 체크포인트 브라우저 열기
  • 5가지 복구 옵션으로 코드만, 대화만, 또는 둘 다 되돌리기 가능
  • 안전한 실험의 핵심 도구 — 망해도 언제든 돌아올 수 있음
  • Planning Mode + Checkpoints + Hooks = 완전한 안전 개발 루프

다음에 알아볼 것

  • Module 10: CLI — claude -p, 플래그, 비대화형 모드
  • Module 03: Skills — 자동 감지 기반 재사용 워크플로우


[Series] Claude Code Fundamentals - Checkpoints

Summary

Checkpoints automatically save the conversation state and code files in a Claude Code session, allowing you to rewind to any previous point at any time. No configuration is needed — a new checkpoint is created automatically with every prompt.


Key Concepts

Most Important Feature — No Setup Required

Checkpoints are a built-in default behavior in Claude Code. No configuration needed. A new checkpoint is created automatically with every user prompt.

Every time I enter something → checkpoint created automatically
Can always rewind without any setup or commands

What Gets Saved in a Checkpoint

Conversation history (messages)
    +
Code file state (files Claude modified)
    =
Complete snapshot of that moment

How to Rewind

# Method 1: Keyboard shortcut
Esc + Esc      # Opens the checkpoint browser

# Method 2: Command
/rewind        # Same action
/checkpoint    # Alias for /rewind (identical behavior)

5 Options When Rewinding

1. Restore code and conversation  → Reverts both files and messages
2. Restore conversation           → Reverts messages only, keeps current code
3. Restore code                   → Reverts files only, keeps current conversation
4. Summarize from here            → Summarize from this checkpoint onward
5. Never mind                     → Cancel

3 Real-World Usage Patterns

Pattern 1 — Comparing Two Approaches

1. Current state → Checkpoint A (auto-created)
2. Implement Redis caching → Checkpoint B
3. Esc+Esc → Rewind to Checkpoint A
4. Implement in-memory caching → Checkpoint C
5. Compare B and C → Choose the better approach

Pattern 2 — Safe Refactoring

1. Current state → auto checkpoint
2. Start refactoring
3. Run tests
4. Tests pass → continue
5. Tests fail → Esc+Esc → rewind

Pattern 3 — Combined with Planning Mode

/plan implement feature
→ Review and approve plan
→ Auto checkpoint created at each phase
→ If something goes wrong, rewind to any step

Relationship with Other Features

Planning Mode   →  Review plan before execution
Checkpoints     →  Rewind anytime during execution
Hooks           →  Enforce quality checks after execution

Combined, these three form a safe development loop: "plan → execute → verify → rollback if needed".


TL;DR

  • Checkpoints need zero setup — auto-created with every prompt
  • Esc + Esc or /rewind opens the checkpoint browser anytime
  • 5 recovery options: revert code only, conversation only, or both
  • The key tool for safe experimentation — always a way back
  • Planning Mode + Checkpoints + Hooks = complete safe development loop

0개의 댓글