Summer Sale Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: 70percent

Anthropic CCAR-F Claude Certified Architect – Foundations Exam Practice Test

Demo: 18 questions
Total 60 questions

Claude Certified Architect – Foundations Questions and Answers

Question 1

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 need to add a date validation check ensuring event dates are in the future. This requires adding a conditional statement to one existing function in a single file.

What is the most appropriate approach?

Options:

A.

Use direct execution to make the change.

B.

Start with extended thinking mode enabled to ensure thorough reasoning about the validation logic.

C.

Enter plan mode first to create a detailed implementation strategy before making the change.

D.

Enter plan mode to analyze how the validation might impact other parts of the reservation flow.

Question 2

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 codebase exploration tool stores session IDs to allow engineers to continue investigations across work sessions. An engineer spent an hour yesterday analyzing a legacy authentication module, building context about its architecture and dependencies. They want to continue today. The session ID is valid, but version control shows 3 of the 12 files the agent previously read were modified overnight by a teammate’s merge.

What approach best balances efficiency and accuracy?

Options:

A.

Start a fresh session to ensure the agent works with current codebase state without stale assumptions

B.

Resume the session and inform the agent which specific files changed for targeted re-analysis

C.

Resume the session and immediately have the agent re-read all 12 previously analyzed files

D.

Resume the session without informing the agent about the changed files

Question 3

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.

When the agent calls lookup_order and receives order details showing the item was purchased 45 days ago, how does the agentic loop determine whether to call process_refund or escalate_to_human next?

Options:

A.

The order details are added to the conversation and the model reasons about which action to take.

B.

The orchestration layer automatically routes to the next tool based on the order’s status field.

C.

The agent follows a pre-configured decision tree mapping order attributes to specific tool calls.

D.

The agent executes the remaining steps in a tool sequence planned at the start of the request.

Question 4

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 analyzed a complex service module—reading 23 source files, tracing request flows, and identifying error handling patterns. A developer wants to compare two testing strategies before committing to one: end-to-end tests with mocked external services vs. snapshot tests capturing expected outputs. They need to independently develop both approaches to evaluate trade-offs.

How should you manage the sessions?

Options:

A.

Resume the analysis session with fork_session enabled, creating a separate branch for each testing strategy.

B.

Start two fresh sessions, having each re-read the relevant source files before beginning.

C.

Continue in the original session, developing end-to-end tests first, then snapshot tests sequentially.

D.

Export the analysis session’s key findings to a file, then create two new sessions that reference this file.

Question 5

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.

Your process_refund tool returns two types of errors: technical errors (“503 Service Unavailable”, “Connection timeout”) that are transient (~5% of calls), and business errors (“Order exceeds 30-day return window”, “Item already refunded”) that are permanent (~12% of calls). Monitoring shows the agent wastes 3–4 turns retrying business errors that can never succeed. Currently, both error types return only a plain text message to Claude.

What’s the most effective way to reduce wasted retries while improving customer-facing response quality?

Options:

A.

Implement automatic retry logic at the tool layer for technical errors only, passing business errors to Claude without retries.

B.

Add few-shot examples showing how to distinguish retriable from non-retriable errors by parsing error message text.

C.

Add a check_refund_eligibility tool that must be called before process_refund to prevent business rule violations.

D.

Return structured error responses with "retriable": false for business errors and a customer-friendly explanation for Claude to use.

Question 6

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 code review assistant needs to analyze pull requests and provide feedback on three aspects: code style compliance, potential security issues, and documentation completeness. Each aspect requires reading files, running analysis tools, and generating a report section. The review process follows the same three-step workflow for every PR.

Which task decomposition pattern is most appropriate for this workflow?

Options:

A.

Single comprehensive prompt—include all three instructions in one prompt and let the model handle all three aspects simultaneously.

B.

Orchestrator-workers—have a central LLM analyze each PR to dynamically determine which checks are needed, then delegate to specialized worker LLMs for each identified subtask.

C.

Prompt chaining—break the review into sequential steps where each aspect (style, security, documentation) is analyzed separately, with outputs combined in a final synthesis step.

D.

Routing—classify each PR by type (feature, bugfix, refactor) first, then route to different review prompts optimized for that category.

Question 7

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.

A security audit requires updating your authentication library from v2 to v3. The migration guide documents breaking changes: authenticate() now returns a Promise instead of accepting a callback, the User type has restructured fields, and three deprecated methods were removed. Grep shows the library is imported in 45 files across several modules.

What’s the most effective approach?

Options:

A.

Create a custom slash command encapsulating the migration transformations, then execute it against each file without prior codebase exploration.

B.

Update the dependency version, run the test suite, and use Claude Code to fix each failure as it appears.

C.

Enter plan mode to explore library usage across modules, map affected code paths, then create a migration strategy before implementing.

D.

Paste the migration guide’s breaking changes into your prompt and use direct execution to update all usages across the 45 files.

Question 8

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 asks your agent to add comprehensive tests to a legacy codebase with 200 files and minimal existing test coverage. The engineer hasn’t specified which modules to prioritize.

How should the agent decompose this open-ended task?

Options:

A.

Create a fixed testing schedule upfront based on directory structure, allocating equal effort to each top-level directory regardless of code complexity or business importance.

B.

Use Glob and Grep to map codebase structure, identify heavily-coupled modules, create a prioritized plan for high-impact areas, and revise as dependencies are discovered.

C.

Systematically read all 200 files to create a complete function inventory before writing any tests, ensuring the testing plan accounts for every function before beginning.

D.

Start writing tests for the first module alphabetically, using test failures and imports to discover related files organically.

Question 9

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 the agent yesterday to analyze a legacy authentication module, identifying two distinct refactoring approaches: extracting a microservice versus refactoring in-place. Today, they want to explore both approaches in depth—having the agent propose specific code changes for each—before deciding which to implement.

What’s the most effective way to structure this exploration?

Options:

A.

Use fork_session to create two branches from yesterday’s analysis, exploring one approach in each fork.

B.

Resume yesterday’s session and explore both approaches sequentially within the same conversation thread.

C.

Resume yesterday’s session to explore the first approach, then start a new session for the second, manually recreating the original context.

D.

Start two fresh sessions, manually providing a summary of yesterday’s analysis findings to establish context.

Question 10

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 processes restaurant menus and must output structured JSON with fields for item names, descriptions, prices, and dietary tags. Some menus use inconsistent formatting—prices as “$12” vs “12.00”, dietary info as icons vs text.

What’s the most reliable approach?

Options:

A.

Use separate extraction calls for each field to ensure consistent handling of each type.

B.

Define a strict output schema and include format normalization rules in your prompt.

C.

Request multiple extraction attempts per document and select the most common format.

D.

Extract data as-is and normalize formats in post-processing code after Claude returns.

Question 11

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.

You’ve configured your Claude agent with three MCP servers: one for git operations, one for Jira ticket management, and one for documentation search.

When a user asks the agent to “create a branch for JIRA-123 and add documentation links to the ticket,” how does the agent access tools across these servers?

Options:

A.

Tools from all configured MCP servers are discovered at connection time and available simultaneously to the agent.

B.

The agent queries each server sequentially to determine which handles each tool, routing calls based on tool name prefixes.

C.

The agent automatically selects the most relevant server based on the request and loads only that server’s tools.

D.

You must specify which MCP server to use for each turn, and the agent can only access one server’s tools at a time.

Question 12

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?

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.

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.

Question 13

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 reveal inconsistent error handling: when lookup_order fails, the agent sometimes retries 5+ times (wasteful when the order ID doesn’t exist), sometimes escalates immediately (premature for temporary network issues), and sometimes asks users for clarification (inappropriate when the issue is a backend permission error). Investigation shows your MCP tool returns uniform error responses: {"isError": true, "content": [{"type": "text", "text": "Operation failed"}]} . The agent cannot distinguish between error types.

What’s the most effective improvement?

Options:

A.

Enhance error responses with structured metadata—include error_category (transient/validation/permission), isRetryable boolean, and a description of what caused the failure.

B.

Implement retry logic with exponential backoff in your MCP server for all errors, returning to the agent only after retries are exhausted.

C.

Create an analyze_error MCP tool the agent calls after any failure to determine the error category and recommended action.

D.

Add few-shot examples to the system prompt demonstrating how to interpret error message patterns and select appropriate responses for each.

Question 14

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 system must extract event details from calendar invitations and output JSON that strictly conforms to a schema with fields for title, date, time, location, and attendees. Downstream systems reject any malformed or non-conformant JSON.

What approach provides the most reliable schema compliance?

Options:

A.

Pre-fill Claude’s response with an opening brace to force JSON output, then complete and parse the response.

B.

Append instructions like “Output only valid JSON matching the schema exactly” and implement retry logic to re-prompt when JSON parsing fails.

C.

Define a tool with your target schema as input parameters and have Claude call it with the extracted data.

D.

Include detailed JSON formatting instructions and the target schema in your prompt, then parse Claude’s text response as JSON.

Question 15

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.

During testing, you find that when a customer says “I need a refund for my recent purchase,” the agent calls process_refund immediately—but populates the required order_id parameter with a plausible-looking but fabricated value instead of first calling lookup_order to retrieve the actual order ID. The refund call fails because the fabricated ID doesn’t exist.

Which change directly addresses the root cause of the agent fabricating the order_id value?

Options:

A.

Update the process_refund tool description to explicitly state that order_id must be obtained from a prior lookup_order call and must never be assumed or invented.

B.

Switch tool_choice from "auto" to "any" to force the agent to make a tool call on every turn.

C.

Add server-side validation that checks whether the order_id exists in your database before executing the refund, returning an error to the agent if not found.

D.

Pre-parse incoming customer messages to extract any order IDs mentioned, and inject them into the conversation context before passing to Claude.

Question 16

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?

Options:

A.

Route extractions where the model indicates low confidence or where source documents contain ambiguous or contradictory information.

B.

Route extractions containing specific high-priority entity types (e.g., financial figures, dates) for human review, regardless of extraction confidence.

C.

Route extractions for review only when downstream systems report data quality issues or processing failures.

D.

Randomly sample 5% of extractions for review.

Question 17

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.

1.5An engineer asks the agent to understand how the caching layer works before adding a new cache invalidation trigger. After initial Grep searches, the agent has identified that caching logic spans 15 files including decorators, middleware, and service classes (~6,000 lines total).

What’s the most effective next step for building understanding while managing context constraints?

Options:

A.

Use Grep to search for “invalidate” and “expire” patterns across all files, then Read only those specific line ranges with minimal surrounding context.

B.

Use the Read tool to sequentially load all 15 files, building complete understanding across the full caching implementation.

C.

Use Glob to find files matching common caching patterns ( cache*.py , caching/ ), prioritize the largest files by reading them first, then check smaller files for gaps.

D.

Analyze imports and class hierarchies to identify the base cache class. Read that file to understand the interface, then trace specific invalidation implementations.

Question 18

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.

After expanding the agent’s MCP tools with delivery-specific capabilities (check_delivery_status, contact_driver, issue_credit, apply_promo_code, update_delivery_address, reschedule_delivery), the total tool count has grown from 4 to 10. Your evaluation suite shows tool selection accuracy has dropped from 88% to 71%. Log analysis reveals the majority of errors involve the agent selecting between semantically overlapping tools—calling issue_credit when process_refund was correct, and calling check_delivery_status when lookup_order already returns the needed data.

Which approach structurally eliminates the semantic overlap identified in the logs as the error source?

Options:

A.

Split the tools across two sub-agents—a “financial resolution” agent with process_refund, issue_credit, and apply_promo_code, and a “delivery operations” agent with the remaining delivery tools—with a coordinator routing between them.

B.

Consolidate semantically overlapping tools—merge issue_credit and process_refund into a single resolve_compensation tool with an action parameter, and fold check_delivery_status into lookup_order with an optional include_tracking flag.

C.

Enable the tool search tool with defer_loading on the six new tools, keeping the original four always loaded, so the agent dynamically discovers specialized tools only when needed.

D.

Add few-shot examples to the system prompt demonstrating correct selection for each ambiguous tool pair, such as showing when issue_credit applies versus when process_refund is appropriate.

Demo: 18 questions
Total 60 questions