0Pricing
Claude Architect · 강의

세션 관리

--resume으로 이름이 지정된 세션을 재개하고 fork_session으로 분기합니다

세션 관리은(는) CoddyKit의 무료 Claude Architect 강의입니다. 이것은 4개 중 3번째 강의입니다. 아래에서 전체 강의를 무료로 읽을 수 있으며, 내장 코드 에디터와 24/7 AI 튜터와 함께 브라우저에서 직접 실습할 수 있습니다. 이 강의는 Claude Architect 학습 경로의 일부이며, 진행 상황이 웹과 CoddyKit 앱에 동기화됩니다. Claude Architect 강의에는 총 4개의 강의가 포함되어 있습니다.

이 강의의 일부는 아직 번역되지 않았으며 영어로 표시됩니다.

Why Session Management Matters

The Claude API keeps no server-side state — every request sends the FULL message history. So "a session" is really a saved conversation transcript you can persist, reopen, and branch.

In Claude Code, session tooling lets you resume a named line of work later and fork a shared starting point into parallel explorations. Mastering this is core to D5 (Context Management) and D3 (Claude Code Workflows) on the architect exam.

Resume vs Fork at a Glance

Two primitives solve two different problems:

  • --resume <name> — continue a single, named session linearly. Same thread, picked up where you left off.
  • fork_session — branch from a shared point into multiple independent lines that don't interfere with each other.

Resume = one timeline continued. Fork = one timeline split into parallel timelines.

Resuming a Named Session

Use --resume <name> to reopen the exact conversation you left, with its full accumulated context. This is ideal for multi-day work on a single task: a long refactor, an incremental investigation, or a feature you're building across sessions.

The name is your handle — give sessions meaningful names so you can find them later.

# Continue a named, persisted session
claude --resume payment-refactor

# Pick up an investigation from yesterday
claude --resume auth-bug-triage

Forking from a Shared Point

fork_session branches from a common starting state — for example, after you've loaded the codebase context and agreed on an approach. Each fork explores a different option without polluting the others' history.

This is the session-level analogue of "try three solutions in parallel": shared setup, independent outcomes.

# Establish shared context, then branch
claude --resume api-redesign

# Fork two independent approaches from that point
claude --fork-session api-redesign --name approach-rest
claude --fork-session api-redesign --name approach-graphql

When to Resume

Reach for --resume when the work is genuinely continuous and the prior context still holds:

  • A linear task spanning multiple work sessions.
  • Incremental investigation where earlier findings remain valid.
  • You want the full reasoning trail intact, not summarized.

Resuming preserves nuance that a summary would flatten — but only if that context is still accurate.

The Stale Context Trap

Here's the architect-grade caveat: resumed tool results can be STALE if the codebase changed. If files moved, tests were rewritten, or a dependency was upgraded since you last ran, the old Read and Grep outputs in history now describe a world that no longer exists.

Claude will reason over outdated facts unless you correct them. Resume is not free — it carries whatever was true at capture time.

Fresh Session + Structured Summary

When context has drifted, a fresh session seeded with a structured summary is often better than resuming. You discard stale tool output and re-ground the model on current reality.

Keep transactional facts — file paths, decisions, open questions — verbatim in a "case facts" block so progressive summarization doesn't make them vague.

# Fresh session, hand it a curated summary instead of stale history
claude --name payment-refactor-v2

# Paste a structured brief:
# DECISIONS: use Stripe PaymentIntents; keep idempotency keys
# DONE: extracted billing/ module; tests green
# OPEN: webhook retry policy undecided
# NOTE: re-read files — repo changed since last session

Fork for Parallel Exploration

Forking shines when you want to compare alternatives fairly. Branch from identical context so the only variable is the approach itself, then evaluate the outcomes side by side.

  • Two refactor strategies from the same baseline.
  • Different prompt phrasings tested against the same loaded context.
  • A risky experiment isolated from your main line.

Because forks don't share ongoing history, one branch's mistakes never contaminate another.

Sessions and Decomposition

Session strategy mirrors task decomposition. For known sequential steps, a single resumed session acts like a fixed pipeline carrying state forward. For open-ended investigation with multiple viable directions, forking supports adaptive exploration.

Don't force a branch where a line suffices — and don't cram divergent experiments into one ever-growing linear session.

Sessions Are Not Subagents

Don't confuse sessions with multi-agent context. Forking branches your own conversation. By contrast, subagents do NOT inherit the coordinator's history — each subagent must be handed its context explicitly in its prompt.

Use sessions to manage your continuity across time; use the hub-and-spoke coordinator pattern to fan work out to fresh agents. They solve different problems.

A Practical Workflow

Putting it together for a multi-day feature:

  • Start named, do the shared setup (load context, agree on plan).
  • Fork when you need to trial competing approaches.
  • --resume the winner across days as you build it out.
  • When the repo shifts under you, abandon the stale session and re-seed a fresh one with a verbatim case-facts summary.

Continuity by default, branch when exploring, refresh when reality moves.

# Day 1: set up + branch
claude --name search-feature
claude --fork-session search-feature --name try-elastic
claude --fork-session search-feature --name try-postgres-fts

# Day 3: continue the chosen path
claude --resume search-feature

# Day 5: repo changed a lot -> fresh + summary
claude --name search-feature-v2

Quick Check

Apply the stale-context principle to a real decision.

Recap: Resume, Fork, Refresh

Key takeaways:

  • --resume <name> continues one named session linearly — great for continuous, multi-session work.
  • fork_session branches from a shared point into independent parallel lines that don't interfere.
  • Resumed tool results can be stale if the code changed — sometimes a fresh session with a structured summary is the better call.
  • Keep transactional facts verbatim outside summaries; sessions manage YOUR continuity, while subagents need context passed explicitly.

Continuity by default, branch to explore, refresh when reality moves.

자주 묻는 질문

“세션 관리” 강의는 무료인가요?

네 — “세션 관리” 전체 내용을 이 웹사이트에서 무료로 읽을 수 있습니다. 인터랙티브하게 실습하려면(내장 코드 에디터와 24/7 AI 튜터), CoddyKit PRO로 업그레이드하면 Claude Architect 강의 전체를 잠금 해제할 수 있습니다. Claude Architect 강의에는 총 4개의 강의가 포함되어 있습니다.

“세션 관리”에서 뭘 배우나요?

--resume으로 이름이 지정된 세션을 재개하고 fork_session으로 분기합니다 브라우저에서 직접 실행하는 실습 코드로 Claude Architect을(를) 배우며, 24/7 AI 튜터가 강의를 진행하면서 질문에 답변해줍니다.

Claude Architect을(를) 시작하는 데 경험이 필요한가요?

사전 경험은 필요하지 않습니다. CoddyKit의 Claude Architect은(는) 초급자부터 고급 학습자까지를 위해 구성되어 있으므로, 여기서 시작하거나 처음부터 시작할 수 있으며 자신의 속도대로 진행할 수 있습니다. 이것은 4개 중 3번째 강의입니다.

“세션 관리” 강의는 얼마나 걸리나요?

대부분의 CoddyKit 강의는 약 5~10분이 소요됩니다. 각 강의는 간결하고 인터랙티브하여 꾸준한 진행이 가능하며, 웹과 앱에서 중단한 부분부터 바로 시작할 수 있습니다.

이 Claude Architect 강의에서 코드를 작성하고 실행할 수 있나요?

네. 모든 Claude Architect 강의에는 내장 코드 에디터가 포함되어 있으므로, 브라우저에서 바로 실제 코드를 작성하고 실행한 후 즉시 AI 피드백을 받을 수 있습니다 — 로컬 설정이 필요 없습니다.

이 강의의 모든 강의

  1. 고정 파이프라인과 적응형 분해
  2. 다중 패스 분해
  3. 세션 관리
  4. 오래된 컨텍스트와 새로 시작하기
← Claude Architect(으)로 돌아가기