Session state, resumption & forking
Manage session state, resumption, and forking.
This subtopic (1.7) sits in Agentic Architecture & Orchestration (D1) on Anthropic's Claude Certified Architect — Foundations (CCA-F) exam. The bank holds 23 practice questions here — 6 easy, 13 medium, and 4 hard — with 5 free to try, answers and explanations included. 3 of the free questions are below; the rest are in the practice stream.
What the exam tests here
- informing agent about file changes when resuming after code modifications
- named session resumption — --resume <session-name>
- starting fresh with structured summary vs resuming with stale tool results
- fork_session for independent branches from shared analysis baseline
Free practice questions: Session state, resumption & forking
Your customer support agent session is resumed after an engineer manually updated the customer's account record in the database during the break. The resumed agent proceeds to process_refund using the account status from prior conversation history. What is the risk of resuming without any intervention?
Show answer & explanation
Correct answer: A. The agent acts on the stale account status in its history, not the updated record.
Resumed sessions restore conversation history as-is — prior tool results (including the old account status) remain in context, and the agent has no mechanism to detect external changes. 'Cannot call process_refund...' is false; tool access is not revoked on resume. 'Re-fetch all prior tool results...' does not happen — history is static on resume. 'Detect the external database change...' is not a built-in SDK behavior.
A customer support agent session resolves a billing dispute and then hits an error. You want to try two different escalation strategies from that same point without either attempt affecting the other. Which statement about fork_session is accurate?
Show answer & explanation
Correct answer: B. The fork branches from the shared baseline; each fork then builds an independent history.
fork_session=True creates a branch at the current session point — both forks share conversation history up to the fork, then diverge independently. 'Empty context...' is wrong; the forked branch inherits all prior context. 'Both forks share history going forward...' reverses the purpose — post-fork actions are isolated per branch. 'Only available with a named session...' is not a constraint; any session_id can be forked.
Your coordinator agent in the research system was started with session_name='topic-run-88'. The process exits and you want to resume it. Which approach correctly restores that session's prior context?
Show answer & explanation
Correct answer: A. Pass resume='topic-run-88' in ClaudeAgentOptions to restore the named session.
The resume field in ClaudeAgentOptions accepts a session name (or session_id) and restores that session's conversation history. 'Re-run with same system prompt...' creates a new session with no prior context. 'session_id=...' is the wrong field name — the parameter is resume. 'Inject the session name into the prompt...' does not restore any session state; it only passes text.
2 more free questions on this subtopic in the practice stream, plus 18 in the full bank. Keep practicing →