Sessions: resume, fork or start fresh
When to resume a named or saved session, when to fork it into independent branches, and when to start fresh with a structured summary instead, with the CLI and Agent SDK spellings side by side and what a resumed or forked session does and does not restore.
Manage session state, resumption, and forking
~8 min read · 12 practice questions ·
What the exam expects
- Continue an investigation across work sessions with
claude --resume <name>, and resume headless or SDK runs by saved session ID. - Use
fork_sessionto branch independent explorations (two refactoring or testing strategies) from one shared analysis baseline. - Choose between resuming (prior context mostly valid) and starting fresh with an injected structured summary (prior tool results stale, or the session lives on another machine).
- Tell a resumed session exactly which files changed so it re-reads them instead of re-exploring everything.
Key terms: session (the saved conversation history: prompts, tool calls, tool results, responses); resume (return to a specific session by ID or name); continue (return to the most recent session in the directory); fork (a new session that starts with a copy of another's history); stale tool result (an earlier file read or query that no longer matches reality).
Key facts
- Detail
- Conversation history, not the filesystem
- Detail
claude -n <name>or/rename <name>; resume withclaude --resume <name>
--continue- Detail
- Most recent session in the directory; skips
claude -pand SDK sessions
--fork-session- Detail
- New session ID when resuming; use with
--resumeor--continue
- Detail
resumeplusfork_session=True/forkSession: true; original unchanged
- Detail
- Resume with a tracked
session_idper user, not continue
- Detail
--mcp-config,--settings,--plugin-dir,--fallback-model,--add-dir
- Detail
- Not rerun; marked as cut off, Claude told to check whether it took effect
- Detail
- Messages interleave into one transcript
- Detail
- Session files are local; use a session store, move the file, or pass results into a fresh prompt
- Why is a structured summary in a new session more reliable than resuming after most files have changed?
- When should an SDK app use
resumewith a stored session ID instead ofcontinue_conversation? - Why can't
claude --continuefind last night'sclaude -paudit?
The questions are free to read. Answers with their sources and self-grading are included with the pack.
Keep reading with the Claude Certified Architect - Foundations pack
- Core concepts
- Exam traps
- Worked scenario
The pack includes:
- All 30 lessons of the Claude Certified Architect - Foundations guide, with reading progress
- Interactive decision walks and step-by-step sequence steppers
- Inline practice questions and one-click topic practice (12 questions for this lesson)
- An official source cited for every claim
- An AI tutor that answers from the guide
- Unlimited timed practice exams
Practice for the Claude Certified Architect - Foundations exam
Certifyforce is an independent study resource and is not affiliated with, endorsed by or sponsored by Anthropic. Claude is a trademark of Anthropic.