CCAR-F practice question 10 of 10
You are building developer productivity tools using the Claude Agent SDK. The agent helps engineers explore unfamiliar codebases, understand legacy…
Full set: 191 questionsThe most efficient and effective approach is to fork the existing session. The initial analysis, which involved reading 23 files and tracing flows, has created a rich, valuable context. The forksession feature is specifically designed for this scenario, allowing the creation of two new, independent child sessions that inherit the complete state and context of the parent. This enables the parallel and isolated development of both testing strategies without repeating the costly initial analysis. Each branch can then proceed without interfering with the other, providing a clean environment for comparing the two approaches.
B. Start two fresh sessions, having each re-read the relevant source files before beginning. This is highly inefficient as it discards the completed analysis and duplicates the expensive initial work for both new sessions.
C. Continue in the original session, developing end-to-end tests first, then snapshot tests sequentially. This fails the requirement for independent development, as the state and artifacts from the first strategy would influence the second.
D. Export the analysis session’s key findings to a file, then create two new sessions that reference this file. This is a lossy and cumbersome workaround. A summary file cannot capture the full, nuanced context that is preserved by forking.
1. Anthropic Claude Documentation, "Tool use": The documentation explains that Claude's ability to use tools effectively relies on the context built throughout a conversation. The model uses the entire history of user prompts, assistant responses, and tool results to inform its next action. Forking a session is the canonical method to leverage this accumulated context for exploring divergent, parallel paths without losing the initial state. (Reference: docs.anthropic.com/claude/docs/tool-use, Section: "How to prompt for tool use").
2. Anthropic Claude Documentation, "Building with Claude": In designing complex, multi-turn interactions with agents, maintaining and manipulating state is critical. The principle of session management, including branching or forking, allows developers to build sophisticated applications where different possibilities can be explored from a common contextual starting point, which is essential for tasks like comparing alternative solutions. (Reference: docs.anthropic.com/claude/docs/building-with-claude, Section: "Building conversational experiences").
Keep practicing
Take the free CCAR-F practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other CCAR-F practice questions
- Question 1You are building a customer support resolution agent using the Claude Agent SDK. The agen…
- Question 2Your team is building an MCP integration where Claude needs to fetch real-time inventory …
- Question 3You are building developer productivity tools using the Claude Agent SDK. The agent helps…
- Question 4You are integrating Claude Code into your Continuous Integration/Continuous Deployment (C…
- Question 6You are building a structured data extraction system using Claude. The system extracts in…
- Question 7You are building a structured data extraction system using Claude. The system extracts in…
