Skip to content

CCAR-F · Domain 1: Agentic Architecture & Orchestration · 27% of the exam

Task 1.7: Manage session state, resumption, and forking

Continuing, resuming by name or ID, and forking sessions in Claude Code and the Agent SDK, telling a resumed session what changed, and knowing when a fresh session with a written summary beats resuming on stale tool results.

Study it

  • Sessions: continue, resume by name or ID, fork, and fresh starts from a summary

    Lesson coming

Sample questions

Try each one before opening the answer. Every option is explained, with the Anthropic documentation page that proves it.

Question 1 · choose 1

An engineer spends several days in Claude Code investigating a flaky payment test, and in the same repository also runs unrelated sessions for code reviews. Each morning they want to return to exactly the payment investigation with its context intact. What should they do?

  1. ASet the payment investigation as the default session in the project's settings.json
  2. BName it with /rename payment-flake and return with claude --resume payment-flake
  3. CStart a fresh session each morning and paste the previous day's full transcript into the first prompt
  4. DRun claude --resume and type the date the investigation started
Show the answer and why
  • ASet the payment investigation as the default session in the project's settings.json

    Incorrect

    No setting pins a default session to reopen; returning to a specific conversation is done when you start Claude Code.

  • BName it with /rename payment-flake and return with claude --resume payment-flake

    Correct

    A named session can be resumed directly by name, whichever session ran most recently.

  • CStart a fresh session each morning and paste the previous day's full transcript into the first prompt

    Incorrect

    Pasting a transcript is slow, bloats context, and loses the session's own record of tool calls and results.

  • DRun claude --resume and type the date the investigation started

    Incorrect

    Sessions are not looked up by date, so this does not take you to the investigation.

Give long-running investigations a name and resume them by name with --resume, which returns to exactly that conversation whatever else ran in the meantime.

Question 2 · choose 1

Yesterday a Claude Code session analyzed the order service and produced a refactoring plan. Overnight a teammate merged a change that rewrote about 30 of the files the session had read, so most of its earlier tool results no longer match the code. What is the most reliable way to continue?

  1. AStart a new session and seed it with a short summary of yesterday's conclusions that still hold
  2. BResume the session and run /compact before continuing with the plan
  3. CResume yesterday's session and carry on with the plan, since the plan is already in its context
  4. DResume the session, list the files that changed, and ask it to re-read only those before updating the plan
Show the answer and why
  • AStart a new session and seed it with a short summary of yesterday's conclusions that still hold

    Correct

    When most earlier tool results are stale, a fresh session seeded with a summary avoids reasoning from outdated file contents.

  • BResume the session and run /compact before continuing with the plan

    Incorrect

    A compacted summary still rests on the outdated file contents.

  • CResume yesterday's session and carry on with the plan, since the plan is already in its context

    Incorrect

    The resumed context is full of file contents that no longer exist, and the plan is built on them.

  • DResume the session, list the files that changed, and ask it to re-read only those before updating the plan

    Incorrect

    Targeted re-reads suit a handful of changed files; with about 30 rewritten files, most of the resumed context is outdated and still competes with the new reads.

Resume when the prior context is mostly still valid. When most earlier tool results are stale, start fresh and inject a concise summary of what still holds instead of reasoning on outdated reads.

Question 3 · choose 1

You resume yesterday's Claude Code session that analyzed a checkout module. Since then, two of the files it read were changed by a teammate; everything else is the same. What should you tell the resumed session?

  1. ANothing; it will notice the changes on its own
  2. BWhich two files changed, so it re-reads them
  3. CTo re-read the entire repository from scratch
  4. DTo forget everything it learned yesterday
Show the answer and why
  • ANothing; it will notice the changes on its own

    Incorrect

    Its context still holds the old contents of those files.

  • BWhich two files changed, so it re-reads them

    Correct

    Targeted re-analysis keeps the still-valid context and refreshes only what changed.

  • CTo re-read the entire repository from scratch

    Incorrect

    Full re-exploration wastes the analysis that is still valid.

  • DTo forget everything it learned yesterday

    Incorrect

    Discarding valid context defeats the purpose of resuming.

When resuming after code changes, name the specific changed files so the session can re-read them instead of re-exploring everything or reasoning from stale reads.

Question 4 · choose 1

Before closing your terminal, you had switched a named Claude Code session into plan mode while reviewing a risky migration. The next day you run claude --resume migration-review from a terminal, without -p. Which permission mode does the session start in?

  1. AacceptEdits, because plan mode always ends when a session closes
  2. BThe default mode, since every resumed session starts fresh
  3. CbypassPermissions, so that the resumed work can continue without prompts
  4. DPlan mode, the mode the session was in when it closed
Show the answer and why
  • AacceptEdits, because plan mode always ends when a session closes

    Incorrect

    Plan mode is restored on a terminal resume; nothing switches it to acceptEdits.

  • BThe default mode, since every resumed session starts fresh

    Incorrect

    A terminal resume keeps the session's mode rather than resetting it.

  • CbypassPermissions, so that the resumed work can continue without prompts

    Incorrect

    Resuming never escalates a session to bypass mode on its own.

  • DPlan mode, the mode the session was in when it closed

    Correct

    Resuming from a terminal restores the permission mode the session was in, with a few documented exceptions.

When you resume from a terminal with --resume or --continue (without -p), Claude Code restores the permission mode the session was in, except in the documented cases; pass --permission-mode to choose another.

Question 5 · choose 1

In an Agent SDK session, a custom endpoint-finder subagent mapped your API routes. You now want to ask it a follow-up that depends on that mapping, without redoing it. What do you need?

  1. AResume the built-in Explore agent instead, since it saw the same files
  2. BResume the session and name the subagent's agentId
  3. CStart a new query and spawn a new endpoint-finder
  4. DFork the session, which shares the subagent's transcript automatically
Show the answer and why
  • AResume the built-in Explore agent instead, since it saw the same files

    Incorrect

    Built-in Explore runs are one-shot and return no agentId.

  • BResume the session and name the subagent's agentId

    Correct

    A resumed subagent keeps its full history; the agentId identifies it within the session.

  • CStart a new query and spawn a new endpoint-finder

    Incorrect

    A new subagent starts fresh and repeats the mapping.

  • DFork the session, which shares the subagent's transcript automatically

    Incorrect

    Forking the main session is not how a specific subagent is resumed.

To resume a subagent, resume its parent session and reference the agentId returned in the Agent tool result; pass the same agent definition again.

Question 6 · choose 1

Yesterday you started an incident investigation with claude --mcp-config ./tracing-mcp.json and named the session incident-42. Today you run claude --resume incident-42, and the conversation is all there, but the tracing tools it used yesterday are missing. What should you do?

  1. AResume again and pass --mcp-config ./tracing-mcp.json, since launch flags like it are not restored
  2. BResume with --fork-session so that the copy reloads the original launch configuration
  3. CRun /clear in the resumed session so that the MCP servers reconnect
  4. DAdd the tracing server's details to the project CLAUDE.md so that the session reconnects to it
Show the answer and why
  • AResume again and pass --mcp-config ./tracing-mcp.json, since launch flags like it are not restored

    Correct

    A resumed session restores the conversation, but servers that came from --mcp-config must be passed again when you resume.

  • BResume with --fork-session so that the copy reloads the original launch configuration

    Incorrect

    A fork copies the conversation into a new session; it does not bring back flags from the original launch.

  • CRun /clear in the resumed session so that the MCP servers reconnect

    Incorrect

    /clear starts a new, empty conversation and does not add servers that were never configured for this launch.

  • DAdd the tracing server's details to the project CLAUDE.md so that the session reconnects to it

    Incorrect

    CLAUDE.md is instructions for Claude, not MCP configuration; it cannot start a server.

Resuming restores the conversation and the state saved in it, but not every launch flag. If the session depended on --mcp-config, --settings, --plugin-dir or --add-dir, pass them again; configuration kept in the standard settings files is re-read at launch.

Question 7 · choose 1

Your Agent SDK app lets users try a risky refactor and undo it if they do not like the result. A teammate assumes that resuming the earlier session will also restore the files. What is accurate?

  1. ACompacting the session restores the files automatically
  2. BSessions keep the conversation only; use file checkpointing
  3. CResuming restores the files to their state at that point
  4. DThe SDK cannot undo edits in any way
Show the answer and why
  • ACompacting the session restores the files automatically

    Incorrect

    Compaction only summarizes the conversation.

  • BSessions keep the conversation only; use file checkpointing

    Correct

    File checkpointing snapshots and reverts the agent's file changes.

  • CResuming restores the files to their state at that point

    Incorrect

    Sessions store conversation history only.

  • DThe SDK cannot undo edits in any way

    Incorrect

    File checkpointing exists for this purpose.

Sessions persist conversation history; to snapshot and revert file changes, use the SDK's file checkpointing (or version control).

Practise domain 1 →Practise all domains →