0Pricing
Claude Architect · Lesson

Session Management

--resume named sessions and fork_session branches.

Session Management is a free Claude Architect lesson on CoddyKit — lesson 3 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Claude Architect learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

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.

Frequently asked questions

Is the “Session Management” lesson free?

Yes — the full text of “Session Management” is free to read here on the web, and the Claude Architect course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Claude Architect course, upgrade to CoddyKit PRO.

What will I learn in “Session Management”?

--resume named sessions and fork_session branches. You practise Claude Architect with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start Claude Architect?

No prior experience is required. Claude Architect on CoddyKit is structured for beginners through advanced learners; this is — lesson 3 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “Session Management” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this Claude Architect lesson?

Yes. Every Claude Architect lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. Fixed Pipelines vs Adaptive Decomposition
  2. Multi-Pass Decomposition
  3. Session Management
  4. Stale Context & Starting Fresh
← Back to Claude Architect