Session Resume And Fork
Definition
The controls for continuing prior Claude Code sessions: resuming/continuing an existing session in place, or forking it to branch a new session without modifying the original transcript.
Key points
--resume/-r <id>resumes a specific session;--continue/-ccontinues the most recent one.--fork-sessionbranches from an existing session into a new one without modifying the original — parallel exploration from a shared checkpoint.- SDK exposes the same via session-resume options; combine with
--fork-session. - Sits alongside the other CI CD Headless Flags; forking pairs with
--resumeto branch from a chosen point. - For state that must persist across truly independent windows, git checkpoints and Auto Memory complement session resume.
Why it matters for the exam
- D3 (20% of scored content) tests that
--fork-sessionbranches without mutating the original — the correct answer when a scenario needs to explore an alternative from a saved point while keeping the original intact.
Common gotchas
--fork-sessiondoes not alter the original session — that non-destructiveness is the point (and the tested distinction from a plain--resume).--continue/-cgrabs the most recent session;--resume/-rneeds an explicit id.
See also
Sources
Referenced by
Practice questions optional · AI
Generate fresh practice questions about this concept with AI. These are not vault-verified.