Task statement 1.7 · Agentic architecture and orchestration

Manage session state, resumption, and forking

The research coordinator's two-day session for a report on AI in the creative industries holds analyses of 24 sources. You can resume that session, fork it, or start a new one, and the choice goes wrong when stored results are no longer true.

Why it's tested

Resuming is the natural default, but it restores each old tool result word for word and marks none as out of date. If a source changed, the coordinator cites a figure the source no longer contains. The opposite reflex, re-running all 24 analyses because one source moved, throws away hours of valid work.

KnowledgeWhat a session keeps, and three ways back into it

A session is the conversation history the Agent SDK saves as the agent works: the prompt, every tool call, every tool result and every response. Resuming reloads that history, so the agent continues with its earlier reading. --resume is the CLI flag, and --resume <session-name> reloads a session named with claude -n or /rename. Launch flags such as --mcp-config are not restored and must be passed again.

Forking with fork_session starts a new session from a copy of that history, with its own session ID, so two approaches can grow from one shared analysis baseline while the original stays unchanged. A new session starts empty, and you inject a structured summary of what the old one concluded. A session stores the conversation, not the sources, so neither resuming nor forking re-checks anything, and only what you tell the agent can correct a stale result.

Interactive · the same session, three ways to continue it

A named research session at the top, then a band marking that three of the 24 sources it read were revised, then three continuation options side by side below: resume, fork, and a new session with a summary session: creative-ai 62 turns · tool results from 24 sources over the weekend 3 of those 24 sources were revised: their stored results are now false --resume fork_session new session resume every turn restored every tool result restored including the 3 revised ones fixed only if you tell it which sources changed fork history copied new session ID original unchanged the 3 revised results are copied too fresh + summary summary injected old tool results dropped nothing stale survives fine detail is gone and has to be re-found Time reads downward. The choice is made after the change, not before it.

Choose how to continue the session.

Resume: the detail comes back, and the three revised results come back with it, unmarked.

Fork: a copy with its own session ID to diverge from. The original stays unchanged.

Fresh + summary: the conclusions survive, and the stale tool results do not.

Resuming and forking carry the stored tool results forward. Only the new session leaves them behind. claude --resume creative-ai restores the full history, including tool calls and results. The three revised sources look as authoritative as the rest until you tell the agent which ones changed. fork_session=True with resume (or --fork-session in the CLI) copies the history into a new session. Use it for two approaches from one shared baseline. It does nothing about staleness, so correct the analysis before you fork. A new session that receives a structured summary. It is more reliable than resuming when most of the prior tool results are stale, at the cost of detail that must be re-found.

The same three moves in the CLI and the Agent SDK

# Claude Code CLI
claude -n creative-ai              # name it (or /rename)
claude --resume creative-ai        # resume by name
claude --continue                  # most recent here
claude --resume creative-ai --fork-session

# Agent SDK: sid comes from ResultMessage.session_id
ClaudeAgentOptions(resume=sid, fork_session=True)  # Python
{ resume: sid, forkSession: true }               // TypeScript

More precise than the guide. fork_session is the Agent SDK's own option (forkSession in TypeScript), set together with resume. SDK resume takes a session ID, and only the CLI resumes by name (checked 2026-09-30). Exam answer: --resume <session-name> continues a named session, and fork_session branches one.

SkillResume and inform, or start fresh with a summary

On Monday the coordinator resumes creative-ai and drafts the music section. It cites 4% from source 11, a figure the publisher revised to 7% over the weekend. The resumed session restored Thursday's tool result exactly as recorded, so the draft is confidently wrong. Only 3 of the 24 sources were revised, so the prior context is mostly valid, and the fix is to resume and inform the agent about the specific changes. That gets a targeted re-analysis of three sources instead of a full re-exploration of 24.

When the client narrows the brief to Europe and 15 of the 24 sources no longer apply, most stored results are stale. Resuming brings those 15 results back, where they compete with any instruction to ignore them. A new session that receives only a structured summary starts with nothing stale in it, which is why the guide calls it more reliable.

Mostly valid

Resume, then inform

claude --resume creative-ai
> Sources 4, 11 and 17 were revised
  after you read them. Re-fetch and
  re-analyse only those three, then
  update any conclusion citing them.
  The other 21 analyses still stand.

Next move: three re-reads.

Mostly stale

New session, structured summary

TOPIC   AI in creative industries, EU
FOUND   EU visual-art use highest [3, 8]
OPEN    No EU data yet on games jobs
SOURCES 9 of 24 still in scope (list)
CHANGED Brief narrowed to EU on 29 Sep
NEXT    Search EU games data, redraft

Next move: one search, nothing stale in context.

SkillFork to compare two syntheses

Forking fits when the analysis is current and you want to compare two write-ups: by sector (music, film, writing) or by theme (income, copyright, jobs). Resuming creative-ai with fork_session=True gives the by-theme draft its own session ID, while resuming the original ID continues the by-sector draft, and neither sees the other's turns. The fork copies stale results too, so correct the analysis before you fork.

Scenario switchThe guide's own examples are about code. After claude --resume auth-investigation, name the specific files that changed, token.ts and session.ts, so the agent re-reads those two rather than re-explore the repository. To compare two testing strategies from one shared codebase analysis, fork it with --fork-session: unit-first in one copy, integration-first in the other.
The decision test Are most of the session's stored tool results still true? Yes → resume by name and tell the agent which sources or files changed. To try two approaches, fork from that corrected point. No → start a new session with a structured summary.
Takeaway
  • A resumed session trusts every stored result until you say which ones changed.
  • A fork gets its own session ID and leaves the original untouched, so it suits comparing approaches, not fixing staleness.
  • A structured summary carries conclusions, open questions and each source's state, and none of the stale results.

check yourself

0 / 3 answered

Your research coordinator's session on grid-scale battery storage holds 25 source analyses and a draft outline. Before the team returns to it, a regulator publishes a dataset that supersedes 18 of those 25 sources. The seven conclusions that rest on the other sources still hold.Which way of continuing the work is most reliable?

Select one.

A document-analysis session for a policy report has read 40 PDFs, and two of them were replaced overnight with corrected editions. The next step quotes page-numbered passages that exist only in the session's stored tool results. Re-running all 40 analyses would take about six hours.What is the most effective way to continue?

Select one.

Your research system runs on the Agent SDK. A finished analysis session, whose ID is stored as sid, supports two report structures: by region or by technology. Each draft takes several turns, must start from the same analysis without repeating it, and the team wants to return to either draft next week.Which TWO steps best set this up?

Select two.

sources

  1. Claude Docs, "Work with sessions" (Agent SDK): what a session stores, resume by session ID, fork_session=True / forkSession: true, the fork's own ID, and "Sessions persist the conversation, not the filesystem" (checked 2026-09-30).
  2. Claude Docs, "Manage sessions": claude --resume <name>, --continue, naming with claude -n and /rename, what a resumed session restores and which launch flags it does not, and --fork-session (checked 2026-09-30).
  3. Task statement text and the fork_session terminology: Claude Certified Architect — Foundations Exam Guide v1.0, Domain 1.7.