Skip to content

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/-c continues the most recent one.
  • --fork-session branches 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 --resume to 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-session branches 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-session does not alter the original session — that non-destructiveness is the point (and the tested distinction from a plain --resume).
  • --continue/-c grabs the most recent session; --resume/-r needs an explicit id.

See also

Sources