You are building a customer support resolution agent using the Claude Agent SDK. The agent handles high- ambiguity requests like returns, billing disputes, and account issues. It has access to your backend systems through custom Model Context Protocol (MCP) tools (get_customer, lookup_order, process_refund, escalate_to_human). Your target is 80%+ first-contact resolution while knowing when to escalate. Production logs show that when the agent handles complex billing disputes requiring 6+ tool calls, it sometimes exhausts its max_turns limit after gathering data but before completing resolution or escalating. The team's goal is to guarantee that every customer interaction ends with either a completed resolution or a human handoff, regardless of how the agent loop terminates. Which approach achieves this guarantee?
Correct Answer: C
Option C is the only approach that guarantees the required terminal condition independently of the model's behavior. When the agent loop stops, the orchestration layer evaluates the recorded outcome. If neither a successful resolution nor a confirmed human escalation occurred, deterministic application code invokes escalate_to_human using the information accumulated before termination. The max_turns limit is a host-controlled safety boundary. Once that boundary is reached, the model may no longer have an opportunity to follow a prompt instruction or make another tool call. Therefore, the required fallback cannot depend entirely on Claude deciding to escalate before its remaining turns are exhausted. Option A escalates based on an arbitrary 80% threshold and may prematurely terminate cases that could have been resolved successfully within the remaining budget. Option B provides additional turn capacity but does not guarantee that the second agent will complete its work or escalate before its own limit is reached. Option D remains probabilistic and cannot operate after an unexpected termination has already occurred. The orchestration fallback should be idempotent, ensuring that repeated completion checks cannot create duplicate escalation records. It should also include verified customer information, relevant order data, completed actions, failure reasons, and the unresolved request in the handoff payload. Official references/topics: Agent-loop termination, deterministic fallback orchestration, terminal-state validation, human handoff guarantees.
CCAR-F Exam Question 22
You are building developer productivity tools using the Claude Agent SDK. The agent helps engineers explore unfamiliar codebases, understand legacy systems, generate boilerplate code, and automate repetitive tasks. It uses the built-in tools (Read, Write, Bash, Grep, Glob) and integrates with Model Context Protocol (MCP) servers. An engineer's exploration subagent spent 30 minutes analyzing a legacy payment system, reading 47 files and documenting data flows. The session was interrupted when the engineer's connection dropped. While away, a teammate merged a PR that renamed two utility functions. The engineer wants to continue the same exploration. What's the most effective approach?
Correct Answer: C
Resuming the existing subagent preserves the expensive investigative context: files already inspected, data- flow relationships, hypotheses, and intermediate conclusions. Anthropic documents that session history contains prompts, tool calls, tool results, and responses, allowing an interrupted investigation to continue with its prior analysis intact. ( https://code.claude.com/docs/en/agent-sdk/sessions ) Subagent transcripts also persist within their parent session and can be resumed after an interruption or restart. ( https://code.claude.com /docs/en/agent-sdk/subagents?utm_source=chatgpt.com ) The engineer must nevertheless disclose the renamed utility functions. Anthropic explicitly distinguishes conversation persistence from filesystem persistence: resuming restores what the agent previously knew, but it does not freeze or snapshot the repository. ( https://code.claude.com/docs/en/agent-sdk/sessions ) Without the update, the subagent may search for obsolete symbols, misinterpret broken references, or rely on stale file paths. Option A loses the detailed transcript and replaces it with a necessarily compressed summary. Option B preserves context but conceals a material repository change. Option D duplicates a large transcript inside a new context, increasing token consumption without providing any advantage over native resume functionality. The resumed prompt should name the renamed functions, identify the merge or affected files, and instruct the subagent to re-read only the changed areas before continuing its broader exploration. Official references/topics: Session Resume; Persistent Subagent Transcripts; Repository Drift; Targeted Context Refresh.
CCAR-F Exam Question 23
You are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates the output using JavaScript Object Notation (JSON) schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems. Your extraction pipeline validates outputs against JSON schemas, but you need to implement human review given limited reviewer capacity (they can handle approximately 5% of total extraction volume). What's the most effective basis for selecting which extractions to route for human review?
Correct Answer: A
Limited review capacity should be concentrated on records with the highest probability of semantic error. Schema validation confirms that the response has the correct structure and data types; it does not establish that the extracted values are accurate. Ambiguous wording, contradictory passages, missing evidence, and model- reported uncertainty are direct indicators that an extraction requires human judgment. Anthropic's reliability guidance recommends permitting Claude to express uncertainty, grounding factual outputs in source material, and validating critical information because hallucination-reduction methods do not eliminate errors completely. These principles support routing uncertain or evidentially conflicted records to reviewers rather than treating syntactically valid output as automatically trustworthy. ( https://docs.anthropic. com/en/docs/test-and-evaluate/strengthen-guardrails/reduce-hallucinations ) Option B may waste reviewer capacity on clear, well-supported values while overlooking ambiguous errors in other fields. Option C is reactive: downstream acceptance does not guarantee semantic correctness, and silent errors may never produce processing failures. Option D provides an unbiased estimate of overall quality and should be retained as a secondary audit mechanism, but random selection is not the most efficient way to intercept risky records when only 5% can be reviewed. In production, model confidence should not be treated as a calibrated probability by itself. It should be combined with objective signals such as contradictory source spans, missing citations, OCR quality, validation warnings, document type, and business impact. Official references/topics: Human-in-the-Loop Review, Uncertainty Handling, Source Grounding, Risk- Based Escalation.
CCAR-F Exam Question 24
You are building developer productivity tools using the Claude Agent SDK. The agent helps engineers explore unfamiliar codebases, understand legacy systems, generate boilerplate code, and automate repetitive tasks. It uses the built-in tools (Read, Write, Bash, Grep, Glob) and integrates with Model Context Protocol (MCP) servers. Your agent has spent 25 minutes exploring a game engine's rendering subsystem-reading shader code, buffer management, and frame synchronization logic. An engineer now asks it to understand how the physics engine integrates with rendering for collision debug overlays. You notice recent responses reference "typical rendering patterns" rather than the specific VulkanPipeline and FrameGraph classes it discovered earlier. What's the most effective approach?
Correct Answer: C
The reference to generic rendering patterns indicates that the current context has become saturated or that important earlier details are no longer receiving sufficient attention. Anthropic documents that performance can degrade as a Claude Code context window fills with conversation history, file contents, and command output; symptoms include forgetting earlier instructions and making less precise responses. ( https://code. claude.com/docs/en/best-practices ) Option C preserves the high-value rendering discoveries while isolating the physics investigation. The summary should identify the relevant rendering classes, synchronization boundaries, debug-overlay interfaces, and unresolved integration questions. A physics-focused subagent can then inspect collision and simulation code in its own context without adding dozens of additional files to the already crowded main conversation. This explicit summary matters because an ordinary named subagent starts with a fresh, isolated context and does not automatically receive the parent's full conversation history or previously read files. Claude constructs a delegation message containing the task context, so the essential rendering findings must be supplied deliberately. ( https://docs.anthropic.com/en/docs/claude-code/sub-agents ) Option A omits the integration context needed to guide the physics search. Option B destroys useful prior analysis. Option D keeps expanding an already degraded context and treats the symptom rather than controlling context growth. Official references/topics: Context-Window Management; Subagent Isolation; Delegation Summaries; Codebase Exploration.
CCAR-F Exam Question 25
You are using Claude Code to accelerate software development. Your team uses it for code generation, refactoring, debugging, and documentation. You need to integrate it into your development workflow with custom slash commands, CLAUDE.md configurations, and understand when to use plan mode vs direct execution. Your infrastructure-as-code repository includes Terraform modules ( /terraform/ ), Kubernetes manifests ( /kubernetes/ ), and CI/CD pipeline scripts ( /pipelines/ ). Each requires different conventions, but your single root CLAUDE.md has grown to 500+ lines. When developers work on Kubernetes files, Terraform-specific rules load into context unnecessarily, consuming tokens. What is the best approach to reorganize so only relevant guidance loads when editing specific file types?
Correct Answer: A
Path-scoped rules directly satisfy the requirement that instructions load only when Claude works with matching files. Each infrastructure domain can have a separate Markdown file under .claude/rules/ , with YAML paths frontmatter targeting Terraform files, Kubernetes manifests, or pipeline configuration. Anthropic documents that .claude/rules/ keeps project guidance modular and supports conditional loading based on glob patterns. Rules with a paths field apply only when Claude works with matching files, reducing irrelevant context and token consumption. Rules without path frontmatter load unconditionally. ( https://code. claude.com/docs/en/memory ) Option B improves readability but leaves all 500-plus lines in every session. Option C can provide directory- specific CLAUDE.md guidance, but path-scoped rules are more precise when conventions depend on extensions or patterns spanning multiple directories. Option D still requires manual imports and does not provide the documented conditional rule-loading mechanism. A suitable design would use rules such as terraform.md scoped to terraform/**/*.tf , kubernetes.md scoped to kubernetes/**/*.{yaml,yml} , and pipelines.md scoped to the pipeline directory. Broad project-wide commands and repository etiquette can remain in the root CLAUDE.md. Official references/topics: .claude/rules/ ; Path-Specific Rules; YAML Frontmatter; Context-Efficient Instruction Loading.