# Tasks — CLI-073: `--fork-session` restores conversation context (conform code to SPEC)

Spec: `.agents/spec-docs/active/CLI-073-fork-restores-context.md`
Test Plan SSOT: the spec's TC table.

- [x] T1 (TC-01): remove the `!forkSession` guard in
      `interactive-session-restore.loadSessionRecord` so `pendingRestoreMessages` flows on
      fork; the now-unused `forkSession` param removed from the function and its caller.
      Framework restore test: fork injects the source session's messages
      (context usedTokens > 0 / messages present).
- [x] T2 (TC-02): forked session id differs from the source id (fresh UUID preserved).
- [x] T3 (TC-03): source session record unmodified after fork (append-only — store file
      byte-identical).
- [x] T4 (TC-04): end-to-end semantic check via scripted provider through the real CLI
      print path — `-p "Remember 42"` → `-p "What number?" -r <id> --fork-session` request
      messages include the prior conversation; real-binary run as done-gate evidence.
- [x] T5 (TC-05): plain resume (no fork) behavior unchanged (regression — existing resume
      tests green).
- [x] T6 (TC-06): framework SPEC.md restore contract row states fork = new UUID + restored
      messages (matching the CLI SPEC promise).
- [x] T7: wrap-up — framework + cli test/typecheck/lint/build green; PR to develop
      (squash); backlog scenario evidence + move to completed/.

## Test Plan

Authoritative TC table: `.agents/spec-docs/active/CLI-073-fork-restores-context.md`
(## Test Plan). Summary: TC-01..TC-03/05 via framework restore unit tests (temp store,
fork vs resume); TC-04 via scripted-provider e2e + real-binary scenario; TC-06 SPEC.md
diff review at GATE-COMPLETE.
