Free CCAR-F Practice Test Questions 2026

152 Questions


Last Updated On : 17-Aug-2026


The synthesis agent completes its initial pass but flags that three key research questions remain unanswered because the web-search and document-analysis agents did not find relevant information on those specific subtopics. The coordinator currently proceeds directly to report generation, producing reports with incomplete coverage. What change would most effectively improve research completeness?


A. Have the coordinator evaluate the synthesis output for gaps, then redelegate targeted queries to the web-search and document-analysis agents before invoking synthesis again.


B. Have the report-generation agent identify unanswered research questions so users understand the limitations of the final output.


C. Increase the initial breadth of queries sent to the web-search and document-analysis agents to reduce the probability of missing relevant information.


D. Give the synthesis agent direct access to web-search tools so it can autonomously fill knowledge gaps without returning control to the coordinator.





A.
  Have the coordinator evaluate the synthesis output for gaps, then redelegate targeted queries to the web-search and document-analysis agents before invoking synthesis again.

Explanation:
The core problem is a rigid pipeline that proceeds to report generation despite identified knowledge gaps. The synthesis agent has already identified which three research questions remain unanswered, but the system lacks a mechanism to act on this insight. The solution must create a feedback loop where identified gaps trigger targeted follow-up research before finalizing the report.

Correct Option:

A. Have the coordinator evaluate the synthesis output for gaps, then redelegate targeted queries to the web-search and document-analysis agents before invoking synthesis again.
This is the most effective approach because it creates an explicit feedback loop where identified gaps drive targeted follow-up research. The coordinator, upon receiving gap information from synthesis, can launch precise queries to address the specific unanswered questions. This iterative refinement continues until coverage is complete or the system determines that information is truly unavailable. This maintains the separation of concerns (specialized agents for search, analysis, and synthesis) while enabling adaptive research depth.

Incorrect Options:

B. Have the report-generation agent identify unanswered research questions so users understand the limitations of the final output.
This simply documents the failure rather than addressing it. Users would receive incomplete reports with disclaimers, which does not achieve the goal of comprehensive, cited reports. This approach violates the system's objective of producing complete research outputs and places the burden of handling gaps on users rather than the system.

C. Increase the initial breadth of queries sent to the web-search and document-analysis agents to reduce the probability of missing relevant information.
While broader initial queries might reduce gaps, they are inefficient and cannot guarantee coverage of all specific subtopics. Broad queries may also retrieve irrelevant information, increasing noise in the synthesis stage. More importantly, this does not address the need for iteration—even with the broadest initial search, gaps may still be identified during synthesis that require targeted follow-up.

D. Give the synthesis agent direct access to web-search tools so it can autonomously fill knowledge gaps without returning control to the coordinator.
This violates the separation of concerns and creates coordination complexity. The synthesis agent would need to manage search logic, analysis, and synthesis, which is beyond its specialization. It also bypasses the coordinator's ability to manage agent lifecycle and track progress. This approach would make the system less maintainable and harder to debug, and may lead to the synthesis agent conducting undisciplined searches that degrade output quality.

Reference:

Anthropic Claude Agent SDK Documentation – Multi-Agent Coordination Patterns – Recommends feedback loops where the coordinator evaluates outputs and re-delegates to specialized agents until coverage criteria are met.

SR Letter 11-7 (Federal Reserve) – Model Risk Management – Emphasizes the importance of iterative refinement and feedback mechanisms in automated decision-making systems to ensure completeness and quality.

BCBS 239 (Principles for Effective Risk Data Aggregation) – Highlights the need for systems to identify and address data gaps through established feedback and remediation processes, rather than simply documenting deficiencies.

You are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates the output using JSON schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems.

Your extraction system uses tool use with a JSON schema containing 12 fields and detailed descriptions, totaling approximately 2,500 tokens for the complete tool definition.

Processing documents under 150,000 tokens yields 98% accuracy. For documents between 175,000 and 190,000 tokens, accuracy drops to 71%, with information from the final third consistently missed. The model’s context window is 200,000 tokens.

What is the most likely cause?


A. Schemas exceeding eight to ten fields increase decision complexity during parameter generation, reducing extraction accuracy independently of document length.


B. The model distributes attention proportionally across the input length, causing fields mentioned only once near the document’s end to receive insufficient processing focus.


C. Very long documents exceed the model’s effective attention span regardless of context limits, causing accuracy degradation for content farther from the prompt instructions.


D. Tool definitions consume input-context tokens. Combined with system prompts and document content, the total approaches the context limit, degrading end-of-document processing.





D.
  Tool definitions consume input-context tokens. Combined with system prompts and document content, the total approaches the context limit, degrading end-of-document processing.

Explanation:
The tool definition (2,500 tokens) combined with system prompts and document content pushes the total input close to the 200,000-token context limit. Accuracy drops sharply only for documents between 175,000–190,000 tokens—suggesting the total input exceeds the effective processing capacity, degrading extraction for content at the document's end.

Correct Option:

D. Tool definitions consume input-context tokens. Combined with system prompts and document content, the total approaches the context limit, degrading end-of-document processing.
This is the most likely cause because it directly correlates with the observed accuracy pattern. Documents under 150,000 tokens (total input around 155,000–160,000 including tool definitions and prompts) perform well. Documents between 175,000–190,000 tokens (total input around 180,000–195,000) approach the 200,000-token limit, causing the model to lose focus on content near the end. The missed information from the final third indicates that the model's processing degrades as the context window saturates, not that the schema is too complex or attention is inherently limited.

Incorrect Options:

A. Schemas exceeding eight to ten fields increase decision complexity during parameter generation, reducing extraction accuracy independently of document length.
If this were the cause, accuracy would degrade consistently across all document lengths, not just documents over 175,000 tokens. The schema is constant across all processing, so the accuracy drop must be related to document length, not schema complexity. The 98% accuracy on shorter documents rules out schema complexity as the primary cause.

B. The model distributes attention proportionally across the input length, causing fields mentioned only once near the document's end to receive insufficient processing focus.
While attention distribution is a real phenomenon, it does not explain why accuracy drops specifically at the 175,000–190,000 token range. If attention were proportionally distributed, accuracy would degrade more gradually across all document lengths. The sharp threshold suggests a capacity limit (context saturation) rather than an attention distribution issue.

C. Very long documents exceed the model's effective attention span regardless of context limits, causing accuracy degradation for content farther from the prompt instructions.
This is too broad and contradicts the model's documented 200,000-token context window. The degradation is not a general "effective attention span" issue—it occurs only when the total input approaches the documented limit. Documents at 150,000 tokens perform well, so the model's effective attention span is adequate for that length. The issue is total input approaching the context limit.

Reference:

Anthropic API Documentation – Context Window – Clarifies that the total input (system prompt, tool definitions, messages, and content) counts against the context window, and performance can degrade as the limit is approached.

Anthropic Prompt Engineering Best Practices – Long Documents – Recommends monitoring total token usage, including tool definitions and prompts, and chunking or truncating content when approaching context limits.

SR Letter 11-7 (Federal Reserve) – Model Risk Management – Emphasizes the importance of monitoring and managing input sizes in automated systems to ensure consistent performance and accuracy.

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 submits two requests:

Request A: “Rename the getUserData function to fetchUserProfile everywhere it’s used.”

Request B: “Improve error handling throughout the data processing module—add

try/catch blocks, meaningful error messages, and ensure failures don’t silently corrupt data.”

For which request does specifying an explicit multi-phase workflow (such as analyze propose implement with review) most improve outcome quality?


A. Neither request benefits significantly


B. Request A, the function rename task


C. Both requests benefit equally


D. Request B, the error handling task





D.
  Request B, the error handling task

Explanation:
The two requests differ significantly in complexity and ambiguity. Request A is a straightforward, well-defined refactoring with a single, unambiguous outcome (rename a specific function). Request B is broad, open-ended, and involves multiple concerns (adding try/catch, meaningful error messages, preventing silent data corruption), with many possible implementations and trade-offs. A multi-phase workflow provides structure and validation for the complex task.

Correct Option:

D. Request B, the error handling task
This is the most correct answer because Request B is inherently ambiguous and complex. It requires analyzing the existing error patterns, designing appropriate error handling strategies, implementing changes across multiple locations, and reviewing for correctness and consistency. A multi-phase workflow (analyze → propose → implement → review) provides crucial structure: analysis identifies current gaps, proposal ensures alignment with team practices, implementation is systematic, and review catches issues. Without such structure, the agent might introduce inconsistent error handling, break existing behavior, or miss edge cases.

Incorrect Options:

A. Neither request benefits significantly
Request B clearly benefits from a multi-phase workflow due to its complexity and ambiguity. Even Request A could benefit modestly from a "propose and review" phase to ensure the rename is done correctly, but the benefit is far more significant for Request B.

B. Request A, the function rename task
While a simple "propose and review" could help ensure the rename is done correctly, the task is straightforward and well-defined. The marginal benefit of an explicit multi-phase workflow is small compared to Request B. A single "find and replace" operation with verification is sufficient for this task.

C. Both requests benefit equally
The benefit is not equal. Request A is simple, localized, and has a clear success criterion. Request B is complex, broad, and involves multiple interrelated changes across the module. Multi-phase workflows are most valuable for tasks requiring analysis, design decisions, and validation—characteristics of Request B, not Request A.

Reference:

Anthropic Claude Code Documentation – Multi-Phase Workflows – Recommends explicit workflows (analyze → propose → implement → review) for complex, ambiguous tasks; simpler tasks can be handled with direct execution or minimal planning.

Software Engineering – Task Complexity Classification – Highlights that complex, multi-step, open-ended tasks benefit from structured workflows and validation, while simple, well-defined tasks do not.

SR Letter 11-7 (Federal Reserve) – Model Risk Management – Emphasizes that the level of process rigor should be proportionate to the complexity and risk of the task being performed.

You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports.

Your multi-agent research pipeline crashes after processing 12 of 28 documents. The websearch agent had identified relevant sources, the document analyzer had partially completed extraction, and the synthesizer had begun identifying patterns. You need to resume processing without repeating work or losing fidelity in the prior findings.

What state-management approach best balances information fidelity with context efficiency when restoring agent state?


A. Index all agent outputs in a shared vector store. When resuming, each agent queries the store using semantic search to retrieve relevant prior findings.


B. Have each agent persist a structured export to a known location. On resumption, the coordinator loads the manifest and injects relevant state into agent prompts.


C. Have each agent maintain its own persistent state file and reload it independently at the beginning of every session.


D. Persist the coordinator’s conversation log containing all task delegations and responses, providing this log to agents when resuming.





B.
  Have each agent persist a structured export to a known location. On resumption, the coordinator loads the manifest and injects relevant state into agent prompts.

Explanation:
The pipeline crashed mid-processing after completing work on 12 of 28 documents, with partial progress from multiple agents. The solution must preserve the fidelity of completed work while efficiently loading only the necessary state for resumption. A structured, coordinated state management approach ensures completeness without redundant processing.

Correct Option:

B. Have each agent persist a structured export to a known location. On resumption, the coordinator loads the manifest and injects relevant state into agent prompts.
This is the most effective approach because it combines fidelity with efficiency. Each agent exports a structured, complete representation of its work (findings, extractions, patterns identified) to a known location. The coordinator maintains a manifest tracking which documents and tasks are complete. On resumption, the coordinator loads the manifest, determines what work remains, and injects only the relevant completed state into agent prompts. This avoids repeating work (the 12 processed documents) while ensuring complete fidelity through structured data rather than lossy summaries.

Incorrect Options:

A. Index all agent outputs in a shared vector store. When resuming, each agent queries the store using semantic search to retrieve relevant prior findings.
Vector stores are designed for semantic similarity retrieval, not precise state restoration. Semantic search may retrieve incomplete or irrelevant results, potentially missing critical prior findings. This approach also introduces retrieval uncertainty and complexity, as agents would need to formulate effective queries to locate their own prior work. Structured exports with clear manifests are far more reliable for deterministic state restoration.

C. Have each agent maintain its own persistent state file and reload it independently at the beginning of every session.
This approach lacks coordination and could lead to inconsistency or duplication. Without a central manifest, agents may not know which documents were already processed by other agents, potentially causing redundant work or gaps. Independent state management also makes it difficult to ensure cross-agent consistency, as each agent's view of "completed" may differ.

D. Persist the coordinator's conversation log containing all task delegations and responses, providing this log to agents when resuming.
The conversation log is a lossy, narrative representation that may not capture all structured details needed to resume accurately. Agents would need to parse the log to reconstruct state, which is error-prone and inefficient. This approach also lacks the structured data needed for precise resumption—the log may contain instructions and summaries but not the complete findings needed to avoid reprocessing.

Reference:

Anthropic Claude Agent SDK Documentation – State Management – Recommends structured state persistence with manifests to enable efficient resumption after failures.

SR Letter 11-7 (Federal Reserve) – Model Risk Management – Emphasizes the importance of data persistence, audit trails, and recovery mechanisms in automated systems to ensure reliability and completeness.

Distributed Systems Best Practices – Checkpointing – Highlights that structured checkpoints with manifests are more reliable than log-based or retrieval-based state restoration for resuming work after failures.

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 system implements automatic retries when validation fails. On each retry, the specific validation error is appended to the prompt. This retry-with-error-feedback approach resolves most failures within 2–3 attempts.

For which failure pattern would additional retries be LEAST effective?


A. The model extracts keywords as a nested object organized by category when the schema requires a flat array of strings.


B. The model extracts “et al.” for co-authors when the full list exists only in an external document not in the input.


C. The model extracts citation counts as locale-formatted strings (“1,234”) when the schema requires integers.


D. The model extracts dates as ISO 8601 datetime strings (“2023-03-15T00:00:00Z”) when the schema requires only the date portion (YYYY-MM-DD).





B.
  The model extracts “et al.” for co-authors when the full list exists only in an external document not in the input.

Explanation:
The retry-with-error-feedback approach works by correcting formatting or interpretation errors based on the schema and prompt. This relies on the necessary information being present in the input document. The approach is least effective when the failure is due to missing information, because no amount of retry with feedback can recover data that is not there.

Correct Option:

B. The model extracts "et al." for co-authors when the full list exists only in an external document not in the input.
This failure pattern is fundamentally different from the others because it involves information that is simply not available in the document being processed. The model cannot extract the full author list because it only appears in an external document outside the input. Additional retries with error feedback will not help because the feedback instructs the model to provide data it cannot access—the information does not exist in the source. This is an information gap, not a formatting or interpretation error.

Incorrect Options:

A. The model extracts keywords as a nested object organized by category when the schema requires a flat array of strings.
This is a structural/formatting error. The information (keywords) is present in the document, but the model structures it incorrectly. Retry with error feedback can correct this by clarifying the expected schema (flat array), and the model can extract the same information in the correct format.

C. The model extracts citation counts as locale-formatted strings ("1,234") when the schema requires integers.
This is a formatting/type error. The information (citation count) is present, but the model formats it as a string with commas rather than a raw integer. Retry with error feedback can correct this by clarifying the required format, and the model can extract the same count as an integer.

D. The model extracts dates as ISO 8601 datetime strings ("2023-03-15T00:00:00Z") when the schema requires only the date portion (YYYY-MM-DD).
This is a formatting/truncation error. The full datetime is present, but the schema only requires the date portion. Retry with error feedback can instruct the model to extract only the YYYY-MM-DD portion, and the model can reformat the same information correctly.

Reference:

Anthropic Prompt Engineering Best Practices – Error Feedback – Highlights that retry-with-error-feedback is effective for correcting formatting, interpretation, and structural errors when the information is present in the input.

Data Extraction Best Practices – Clarifies that retries cannot recover information that is not present in the source document; these cases require different handling (external lookups, manual review, or schema relaxation).

SR Letter 11-7 (Federal Reserve) – Model Risk Management – Emphasizes the importance of understanding the root cause of extraction failures to apply appropriate remediation strategies (information gap vs. formatting error).

You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports.

The document-analysis agent has a single analyze_document tool that takes a document and a free-text instruction parameter. During evaluation, requests such as “extract the key financial metrics” often return narrative summaries, while “summarize the methodology” sometimes returns raw data tables. The synthesis agent reports that 35% of analysis results require new requests with clarified instructions.

What is the most effective way to improve reliability?


A. Enhance the tool description with detailed examples showing how different instruction phrasings should map to different output formats.


B. Split the generic tool into purpose-specific tools—extract_data_points, summarize_content, and verify_claim_against_source—each with defined input and output contracts.


C. Keep the single tool but add an analysis_type enum parameter requiring explicit selection between extraction, summarization, and verification modes.


D. Have the coordinator pre-classify each analysis request before passing instructions to the document-analysis agent.





B.
  Split the generic tool into purpose-specific tools—extract_data_points, summarize_content, and verify_claim_against_source—each with defined input and output contracts.

Explanation:
The root cause is that a single, flexible tool with free-text instructions produces inconsistent output formats because the model must infer intent and format simultaneously. This ambiguity leads to 35% of results requiring rework. The solution must enforce structured, predictable outputs for each distinct analysis type while maintaining clear, machine-readable contracts.

Correct Option:

B. Split the generic tool into purpose-specific tools—extract_data_points, summarize_content, and verify_claim_against_source—each with defined input and output contracts.
This is the most effective approach because it creates clear separation of concerns at the tool level. Each tool now has a specific purpose, defined input parameters, and a structured output schema. When the agent calls extract_data_points, it expects and receives structured data; when it calls summarize_content, it receives narrative text. This eliminates ambiguity, making the agent's behavior predictable and the synthesis agent's job easier with consistent, typed outputs.

Incorrect Options:

A. Enhance the tool description with detailed examples showing how different instruction phrasings should map to different output formats.
While better documentation may help, it relies on the model correctly interpreting and applying examples in every case. Examples are not enforceable contracts; the model may still produce narratives for extraction requests or tables for summarization. This approach improves guidance but does not guarantee consistency, as the tool remains a single, flexible endpoint without output validation.

C. Keep the single tool but add an analysis_type enum parameter requiring explicit selection between extraction, summarization, and verification modes.
While this adds structure, it still keeps the tool monolithic and relies on the agent to correctly map the enum to the desired output. The underlying tool behavior remains ambiguous—how does "extraction mode" differ from "summarization mode" in implementation? This approach does not enforce output contracts at the tool level and still allows inconsistency in how each mode is executed.

D. Have the coordinator pre-classify each analysis request before passing instructions to the document-analysis agent.
This shifts the classification burden to the coordinator but does not solve the tool's output ambiguity. The document-analysis agent still receives a free-text instruction and must infer the expected output format. Preclassification may improve instruction quality but does not enforce structured outputs, leaving the same 35% failure rate intact.

Reference:

Anthropic Claude Agent SDK Documentation – Tool Design Best Practices – Recommends creating purpose-specific tools with clear, structured outputs rather than generic tools with flexible instructions, to improve reliability and predictability.

SR Letter 11-7 (Federal Reserve) – Model Risk Management – Emphasizes the importance of defined outputs, validation, and clear contracts in automated systems to support ongoing monitoring and reduce operational risk.

API Design Principles – Interface Segregation – Suggests that well-defined, purpose-specific interfaces reduce complexity and improve reliability compared to monolithic, flexible interfaces.

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.

You’re implementing a new payment processing module that must follow your project’s established patterns for database transactions, error handling, and audit logging. You’ve identified three existing modules that exemplify these patterns: db_utils.py, error_handlers.py, and audit_logger.py. This is a one-off integration task—these patterns are well-documented in your team wiki and don’t need additional project-level documentation.

What’s the most effective approach?


A. Use @ references to include the three modules directly in your prompt, giving Claude concrete code examples of the patterns to follow.


B. Add documentation of each pattern to your CLAUDE.md file, establishing them as project conventions that Claude will apply automatically.


C. Describe the patterns from the three modules in natural language in your prompt, explaining the transaction handling approach, error format, and logging conventions Claude should follow.


D. Ask Claude to explore your codebase to find and understand the transaction, error handling, and logging patterns before generating the new module.





A.
  Use @ references to include the three modules directly in your prompt, giving Claude concrete code examples of the patterns to follow.

Explanation:
The task is a one-off integration that needs to follow three existing modules' patterns. The patterns are well-documented elsewhere and don't need to become permanent project conventions. The most effective approach is to provide concrete examples directly in the prompt, giving Claude the exact code patterns to follow without adding permanent documentation.

Correct Option:

A. Use @ references to include the three modules directly in your prompt, giving Claude concrete code examples of the patterns to follow.
This is the most effective approach because it provides exact, unambiguous examples of the patterns to follow. By including the actual code from db_utils.py, error_handlers.py, and audit_logger.py, Claude can directly reference the transaction handling, error formats, and logging conventions used in these established modules. This is efficient for a one-off task, avoids polluting CLAUDE.md with transient instructions, and ensures the new code precisely matches existing patterns.

Incorrect Options:

B. Add documentation of each pattern to your CLAUDE.md file, establishing them as project conventions that Claude will apply automatically.
This is overkill for a one-off integration. Adding patterns to CLAUDE.md makes them permanent project conventions, which is unnecessary if this is a one-time task. It also adds documentation debt, as these patterns may not need to be referenced in every future interaction with Claude. The @ reference approach is more appropriate for a single-use need.

C. Describe the patterns from the three modules in natural language in your prompt, explaining the transaction handling approach, error format, and logging conventions Claude should follow.
Natural language descriptions are lossy and prone to misinterpretation. Key details like specific function signatures, exception types, and logging formats may be missed or misunderstood. Providing the actual code via @ references is more precise and ensures Claude follows the exact patterns rather than a paraphrase of them.

D. Ask Claude to explore your codebase to find and understand the transaction, error handling, and logging patterns before generating the new module.
This is inefficient. You already know which modules exemplify the patterns. Asking Claude to explore the codebase wastes time and tokens rediscovering what you already know. Directly providing the modules via @ references is faster and more focused, allowing Claude to immediately apply the patterns to the new module.

Reference:

Anthropic Claude Code Documentation – @ References – Recommends using @ references to include specific files or code examples in prompts for precise, one-off pattern matching tasks.

Anthropic CLAUDE.md Documentation – Advises using CLAUDE.md for persistent, project-wide conventions, not for transient or one-off instructions.

Software Engineering – Pattern Reuse – Highlights that providing concrete code examples is more reliable than natural language descriptions for ensuring consistent implementation of established patterns.

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.

A developer asks the agent to investigate why a specific API endpoint intermittently returns 500 errors. The codebase has 200+ files and the developer doesn’t know which components are involved. The agent must trace the error through routing, middleware, business logic, and database layers.

What task decomposition approach would be most effective?


A. Have the agent first create a comprehensive plan mapping all code paths through the endpoint before beginning any file exploration or code reading.


B. Define a fixed sequence of investigation steps upfront—grep for error patterns, then read error handlers, then check database queries, then examine middleware—executing each step regardless of intermediate findings


C. Run parallel worker agents that simultaneously investigate all four layers, then synthesize their findings to identify where the error originates.


D. Have the agent dynamically generate investigation subtasks based on what it discovers at each step, adapting its exploration plan as new information about the error path emerges.





D.
  Have the agent dynamically generate investigation subtasks based on what it discovers at each step, adapting its exploration plan as new information about the error path emerges.

Explanation:
The investigation involves tracing an intermittent 500 error through an unfamiliar, 200+ file codebase with unknown components. The most effective approach is adaptive exploration where the agent dynamically generates subtasks based on discoveries, following the error path as it emerges.

Correct Option:

D. Have the agent dynamically generate investigation subtasks based on what it discovers at each step, adapting its exploration plan as new information about the error path emerges.
This is the most effective approach because it mirrors how a human engineer would debug an unknown issue. The agent starts with high-level searches (e.g., Grep for the endpoint route, error logs, or exception types), then dynamically generates follow-up tasks based on findings (e.g., "this file calls service X, investigate that module"). This adaptive approach avoids wasting time on irrelevant components and efficiently traces the error path through routing, middleware, business logic, and database layers, stopping when the root cause is identified.

Incorrect Options:

A. Have the agent first create a comprehensive plan mapping all code paths through the endpoint before beginning any file exploration or code reading.
Creating a comprehensive plan upfront is impractical and inefficient in a 200+ file codebase. The agent lacks sufficient information to map all code paths without first exploring the code. This approach would lead to speculative, incomplete planning and delays actual investigation while consuming unnecessary tokens.

B. Define a fixed sequence of investigation steps upfront—grep for error patterns, then read error handlers, then check database queries, then examine middleware—executing each step regardless of intermediate findings.
A fixed sequence is rigid and inefficient. If the error is discovered in the first layer, subsequent steps are wasted. If the error requires tracing dependencies across layers, a fixed sequence may miss the path if it doesn't follow the actual flow. This approach cannot adapt to unexpected findings or short-circuit when the root cause is identified.

C. Run parallel worker agents that simultaneously investigate all four layers, then synthesize their findings to identify where the error originates.
Parallel investigation is inefficient for this use case. Most of the investigation work may be unnecessary—only one path through the layers is relevant to the specific error. Spawning agents for all four layers simultaneously wastes resources and creates unnecessary complexity for synthesis. Adaptive, sequential exploration following the error path is more efficient.

Reference:

Anthropic Claude Agent SDK Documentation – Task Decomposition – Recommends dynamic, adaptive task generation based on intermediate findings for investigation and debugging tasks in unfamiliar codebases.

Software Engineering – Debugging Best Practices – Highlights that effective debugging follows the error path, adapting as new information emerges, rather than using fixed sequences or exhaustive parallel exploration.

SR Letter 11-7 (Federal Reserve) – Model Risk Management – Emphasizes the importance of adaptive investigation methods in complex systems to efficiently identify root causes.

During initial testing of the automated review pipeline, you notice that reviews of large pull requests containing more than 50 changed files sometimes take over 20 minutes and cost $8–$12 per run because of extensive agentic loops—Claude reads files, runs analysis tools, and iterates many times. Your team needs each invocation to abort after reaching either a fixed iteration count or a fixed dollar amount. Both limits must be enforced by Claude Code itself rather than by the surrounding job runner. Which configuration change directly enforces both per-invocation limits?


A. Add --max-turns 10 --max-budget-usd 2.00 to the claude -p invocation to cap agentic turns and expenditure.


B. Set --permission-mode dontAsk to automatically deny tool-permission requests that are not in the explicitly allowed set.


C. Set timeout-minutes: 5 on the GitHub Actions step and monitor per-run costs through the Anthropic Console usage dashboard.


D. Use the --model flag to select a smaller, less expensive model so that every iteration uses fewer tokens and costs less.





A.
  Add --max-turns 10 --max-budget-usd 2.00 to the claude -p invocation to cap agentic turns and expenditure.

Explanation:
The team needs to enforce per-invocation limits on both iteration count and cost, and these limits must be enforced by Claude Code itself rather than the surrounding job runner. Claude Code provides built-in flags for both purposes, enabling direct enforcement at the invocation level.

Correct Option:

A. Add --max-turns 10 --max-budget-usd 2.00 to the claude -p invocation to cap agentic turns and expenditure.
This is the correct approach because Claude Code natively supports both flags. --max-turns limits the number of agentic loop iterations, preventing excessive tool calls and reading cycles. --max-budget-usd caps the monetary cost of the invocation, stopping the run if the cost exceeds the specified amount. Both limits are enforced by Claude Code itself, satisfying the requirement that they are not dependent on the surrounding job runner. This directly addresses the 20+ minute runtime and $8–$12 cost issues.

Incorrect Options:

B. Set --permission-mode dontAsk to automatically deny tool-permission requests that are not in the explicitly allowed set.
This affects tool access permissions but does not limit iteration count or cost. It would prevent unauthorized tool usage but does nothing to stop the agent from consuming iterations and costs on approved tools. This does not address the core issue of excessive loop iterations.

C. Set timeout-minutes: 5 on the GitHub Actions step and monitor per-run costs through the Anthropic Console usage dashboard.
This enforces a time limit at the job runner level, not at the Claude Code invocation level. The requirement specifically states that limits must be enforced by Claude Code itself, not the surrounding job runner. Additionally, a 5-minute timeout might be too short for legitimate large reviews, and this approach does not limit cost directly.

D. Use the --model flag to select a smaller, less expensive model so that every iteration uses fewer tokens and costs less.
While this reduces per-iteration cost, it does not cap the number of iterations or the total cost. The agent could still run many iterations, accumulating costs and taking excessive time. This does not provide the fixed limits required by the team.

Reference:

Anthropic Claude Code Documentation – CLI Flags – Documents --max-turns for limiting agentic loop iterations and --max-budget-usd for limiting monetary cost per invocation.

Anthropic Claude Code – Cost Management – Recommends using both flags together to control both iteration count and cost for large or complex tasks.

CI/CD Best Practices – Resource Limits – Highlights the importance of setting both iteration and cost limits for automated tasks to prevent runaway resource consumption.

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 used Claude Code yesterday to investigate authentication flows in a legacy monolith, building up significant context over a 2-hour session. Today she wants to continue that specific investigation. She’s worked on three other codebases since then and knows the session was named “auth-deep-dive”.

How should she resume?


A. Use --session-id with the UUID from yesterday’s session transcript file


B. Use --continue to pick up where the most recent conversation left of


C. Start fresh and re-read the same files


D. Use --resume auth-deep-dive to load that specific session by name





D.
  Use --resume auth-deep-dive to load that specific session by name

Explanation:
The engineer explicitly named the session "auth-deep-dive" yesterday and wants to resume that specific investigation, not the most recent session (which involved three other codebases). Claude Code provides a --resume flag that allows resuming a named session, making it easy to continue exactly where she left off.

Correct Option:

D. Use --resume auth-deep-dive to load that specific session by name.
This is the correct approach because the engineer specifically named the session "auth-deep-dive" and wants to continue that investigation. The --resume flag with the session name loads the exact session she wants, preserving all the context built during yesterday's 2-hour investigation. This is the most direct and efficient way to resume the specific session without confusion or losing context.

Incorrect Options:

A. Use --session-id with the UUID from yesterday's session transcript file.
While this would technically work, it requires the engineer to locate the session transcript file and extract the UUID, which is inconvenient and error-prone. The named session approach (--resume auth-deep-dive) is simpler and more user-friendly, as the engineer already knows the session name.

B. Use --continue to pick up where the most recent conversation left off.
The --continue flag resumes the most recent session. However, the engineer has worked on three other codebases since the auth-deep-dive session, so the most recent session would be unrelated to the authentication investigation. This would load the wrong context and not help her continue the investigation.

C. Start fresh and re-read the same files.
Starting fresh would discard all the context built during yesterday's 2-hour session, including understanding of the authentication flows, identified patterns, and explored dependencies. This is inefficient and wastes the investment made in the previous session. The engineer would need to rebuild understanding from scratch.

Reference:

Anthropic Claude Code Documentation – Session Management – Documents the --resume flag for resuming named sessions and --continue for resuming the most recent session.

Anthropic Claude Code – Named Sessions – Recommends using named sessions for long-running investigations and specific tasks to enable easy resumption.

Software Engineering – Productivity Tools – Highlights that session persistence is critical for maintaining context across work sessions, especially for complex investigations.

You are integrating Claude Code into your Continuous Integration/Continuous Deployment (CI/CD) pipeline. The system runs automated code reviews, generates test cases, and provides feedback on pull requests. You need to design prompts that provide actionable feedback and minimize false positives.

During initial testing of the automated review pipeline, you notice that reviews on large pull requests containing more than 50 changed files sometimes take over 20 minutes and cost $8–$12 per run because of extensive agentic loops. Claude reads files, runs analysis tools, and iterates many times. Your team needs each invocation to abort once it reaches both a fixed iteration count and a fixed dollar amount, enforced by Claude Code itself rather than by the surrounding job runner.

Which configuration change directly enforces both per-invocation caps?


A. Switch the --model flag to a smaller, less expensive model so each iteration uses fewer tokens and has a lower per-call cost.


B. Set timeout-minutes: 5 on the GitHub Actions job step and monitor per-run costs through the Anthropic Console usage dashboard.


C. Add --max-turns 10 --max-budget-usd 2.00 to the claude -p invocation to cap iterations and spending.


D. Set --permission-mode dontAsk to automatically deny tool-permission requests not included in the explicitly allowed set.





C.
  Add --max-turns 10 --max-budget-usd 2.00 to the claude -p invocation to cap iterations and spending.

Explanation:
The team needs to enforce per-invocation limits on both iteration count and cost, and these limits must be enforced by Claude Code itself rather than the surrounding job runner. Claude Code provides built-in flags for both purposes, enabling direct enforcement at the invocation level.

Correct Option:

C. Add --max-turns 10 --max-budget-usd 2.00 to the claude -p invocation to cap iterations and spending.
This is the correct approach because Claude Code natively supports both flags. --max-turns limits the number of agentic loop iterations, preventing excessive tool calls and reading cycles. --max-budget-usd caps the monetary cost of the invocation, stopping the run if the cost exceeds the specified amount. Both limits are enforced by Claude Code itself, satisfying the requirement that they are not dependent on the surrounding job runner. This directly addresses the 20+ minute runtime and $8–$12 cost issues.

Incorrect Options:

A. Switch the --model flag to a smaller, less expensive model so each iteration uses fewer tokens and has a lower per-call cost.
While this reduces per-iteration cost, it does not cap the number of iterations or the total cost. The agent could still run many iterations, accumulating costs and taking excessive time. This does not provide the fixed limits required by the team.

B. Set timeout-minutes: 5 on the GitHub Actions job step and monitor per-run costs through the Anthropic Console usage dashboard.
This enforces a time limit at the job runner level, not at the Claude Code invocation level. The requirement specifically states that limits must be enforced by Claude Code itself, not the surrounding job runner. Additionally, a 5-minute timeout might be too short for legitimate large reviews, and this approach does not limit cost directly.

D. Set --permission-mode dontAsk to automatically deny tool-permission requests not included in the explicitly allowed set.
This affects tool access permissions but does not limit iteration count or cost. It would prevent unauthorized tool usage but does nothing to stop the agent from consuming iterations and costs on approved tools. This does not address the core issue of excessive loop iterations.

Reference:

Anthropic Claude Code Documentation – CLI Flags – Documents --max-turns for limiting agentic loop iterations and --max-budget-usd for limiting monetary cost per invocation.

Anthropic Claude Code – Cost Management – Recommends using both flags together to control both iteration count and cost for large or complex tasks.

CI/CD Best Practices – Resource Limits – Highlights the importance of setting both iteration and cost limits for automated tasks to prevent runaway resource consumption.

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 team’s CLAUDE.md includes a rule: “Use 4-space indentation and always run Prettier formatting.” Despite this, code reviews reveal that roughly 30% of files Claude Code generates use inconsistent formatting—sometimes 2-space indentation, sometimes missing trailing commas. Adding emphasis (“IMPORTANT: You MUST use Prettier formatting”) reduces violations to about 15%, but doesn’t eliminate them.

What is the most effective way to ensure all generated code is consistently formatted?


A. Extract the formatting rules into a dedicated skill that Claude loads automatically when generating code, with more detailed examples of correct formatting.


B. Add a Stop hook with a prompt-based check that evaluates whether generated code follows formatting standards and prompts Claude to fix violations.


C. Split the formatting rules into path-scoped .claude/rules/ files that load when Claude works on matching file types.


D. Configure a PostToolUse hook with an Edit|Write matcher that automatically runs Prettier on each file Claude modifies.





D.
  Configure a PostToolUse hook with an Edit|Write matcher that automatically runs Prettier on each file Claude modifies.

Explanation:
Despite clear rules in CLAUDE.md and emphasized instructions, 15% of generated code still has formatting violations. This indicates that relying solely on model instructions is insufficient for deterministic formatting enforcement. The solution must enforce formatting at the system level, automatically correcting any violations after Claude writes or edits code.

Correct Option:

D. Configure a PostToolUse hook with an Edit|Write matcher that automatically runs Prettier on each file Claude modifies.
This is the most effective approach because it guarantees consistent formatting through automated enforcement. By configuring a PostToolUse hook that triggers after any Edit or Write tool call, you ensure that every file Claude modifies is automatically formatted by Prettier. This eliminates the 15% failure rate entirely because formatting is no longer dependent on Claude following instructions correctly—it's enforced at the system level. This approach provides deterministic, consistent results across all generated and modified code.

Incorrect Options:

A. Extract the formatting rules into a dedicated skill that Claude loads automatically when generating code, with more detailed examples of correct formatting.
While this may improve compliance, it still relies on Claude following instructions. The 15% failure rate with emphasized instructions suggests that even with detailed rules and examples, the model may occasionally deviate. This approach does not guarantee compliance and leaves room for formatting violations.

B. Add a Stop hook with a prompt-based check that evaluates whether generated code follows formatting standards and prompts Claude to fix violations.
This relies on a second model pass to check formatting, which may still have the same limitations (the model may miss violations or introduce new ones). Prompt-based checking is not deterministic and adds latency and cost without guaranteeing correct formatting. This approach also still depends on the model's judgment.

C. Split the formatting rules into path-scoped .claude/rules/ files that load when Claude works on matching file types.
While path-scoped rules help with context loading, they still rely on Claude following instructions. This approach does not guarantee formatting compliance and would still leave room for the 15% failure rate. The rules are guidance, not enforcement.

Reference:
Anthropic Claude Code Documentation – Hooks – Documents PostToolUse hooks for automating post-processing actions like formatting after Write/Edit operations.

Anthropic Claude Code – Code Quality – Recommends using PostToolUse hooks for deterministic formatting enforcement rather than relying on prompt-based instructions.

Software Engineering – Automation Best Practices – Highlights that deterministic system-level enforcement is more reliable than instruction-based compliance for tasks like code formatting.


Page 5 out of 13 Pages
PreviousNext
3456
CCAR-F Practice Test Home

What Makes Our Claude Certified Architect – Foundations Practice Test So Effective?

Real-World Scenario Mastery: Our CCAR-F practice exam don't just test definitions. They present you with the same complex, scenario-based problems you'll encounter on the actual exam.

Strategic Weakness Identification: Each practice session reveals exactly where you stand. Discover which domains need more attention, before Claude Certified Architect – Foundations exam day arrives.

Confidence Through Familiarity: There's no substitute for knowing what to expect. When you've worked through our comprehensive CCAR-F practice exam questions pool covering all topics, the real exam feels like just another practice session.