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.
share
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
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.
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.
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.
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.
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.- 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.