Black Friday Special: Limited Time 80% Discount Offer! Use coupon code below to save on all exam bundles! - Ends in 0d 00h 00m 00s - Coupon code: BRITE80

ExamsBrite Dumps

Claude Certified Architect – Foundations Question and Answers

Claude Certified Architect – Foundations

Last Update Dec 1, 2026
Total Questions : 156

We are offering FREE CCAR-F Anthropic exam questions. All you do is to just go and sign up. Give your details, prepare CCAR-F free exam questions and then go for complete pool of Claude Certified Architect – Foundations test questions that will help you more.

CCAR-F pdf

CCAR-F PDF

$24  $119.99
CCAR-F Engine

CCAR-F Testing Engine

$28  $139.99
CCAR-F PDF + Engine

CCAR-F PDF + Testing Engine

$36  $179.99
Questions 1

You are building a structured data-extraction system using Claude. The system extracts information from unstructured documents, validates output against JSON schemas, and integrates the results with downstream systems.

Monitoring reveals that specifications sometimes appear inconsistently within source documents. For example, a summary section might state “Battery: 4000 mAh,” while the detailed specifications table states “Battery: 4200 mAh.” Your current schema contains a single battery_capacity field.

This inconsistency occurs in approximately 15% of documents, and historical analysis confirms that the detailed specifications table is accurate 90% of the time.

What is the most effective approach?

Options:

A.  

Change the field to an array that captures every discovered value and its source location, leaving downstream systems to apply precedence rules.

B.  

Reject every extraction containing conflicting values and require the source document to be corrected before processing continues.

C.  

Add extraction instructions specifying that values from the detailed specifications table take precedence when conflicting values exist, while retaining the single-value schema.

D.  

Add a conflict_detected Boolean field and route every affected document for manual review.

Discussion 0
Questions 2

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.

Production reviews reveal inconsistent handling of uncertainty in final reports. Sometimes conflicting subagent findings are synthesized into a single confident statement, losing important nuance, while other reports use excessive qualifications and become unhelpful. The web-search agent returns, “Industry analysts estimate a $50 billion market size, although methodologies vary.” The document-analysis agent returns, “A peer-reviewed study estimates $35 billion, with a ±$7 billion 95% confidence interval.” The coordinator either selects one estimate arbitrarily or produces a vague $35–$50 billion range.

What systematic approach best addresses this?

Options:

A.  

Implement a confidence-calibration layer that normalizes subagent uncertainty expressions to probability scores between 0.0 and 1.0, and then calculate a confidence-weighted average.

B.  

Configure subagents to report only findings meeting a high-confidence threshold, filtering uncertain information before it reaches the coordinator.

C.  

Add a verification subagent that passes claims to synthesis only when they are corroborated by at least two independent sources.

D.  

Instruct the synthesis agent to distinguish well-established findings from contested findings explicitly, preserving each source’s original uncertainty, methodology, and supporting evidence.

Discussion 0
Questions 3

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 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?

Options:

A.  

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

B.  

Have the coordinator evaluate the synthesis output for gaps, then re-delegate to web search and document analysis with targeted queries before invoking synthesis again.

C.  

Have the report-generation agent note which research questions could not be answered, so users understand the limitations of the final output.

D.  

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

Discussion 0
Questions 4

Your pipeline runs:

PROMPT="You are a code reviewer."

PROMPT="$PROMPT Analyze the provided diff"

PROMPT="$PROMPT for bugs, security issues,"

PROMPT="$PROMPT and style violations."

claude -p \

--dangerously-skip-permissions \

--system-prompt "$PROMPT" < diff.txt

The reviews complete and return feedback, but Claude comments only on the piped diff—it never reads surrounding files in the checked-out repository to understand broader context, even when the diff modifies a function called by many other modules. Which change to the invocation will cause Claude to read related repository files while still applying your custom review instructions?

Options:

A.  

Keep --system-prompt and add --allowedTools "Read, Glob, Grep" because non-interactive -p mode otherwise disables filesystem tools.

B.  

Replace --system-prompt with --append-system-prompt so the review instructions are added to Claude Code’s default prompt instead of overwriting its built-in file-reading and code-navigation guidance.

C.  

Remove --system-prompt entirely and place the review instructions in a root-level CLAUDE.md because --system-prompt is incompatible with tool use under -p.

D.  

Stop piping the diff through standard input and embed it in the prompt string so Claude Code treats the invocation as an agentic session rather than a stream-processing operation.

Discussion 0
Questions 5

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?

Options:

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.

Discussion 0
Questions 6

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.

Your pipeline includes a release-notes generation step that classifies and summarizes approximately 200 commits at the end of each weekly release cycle. Each commit is currently sent as a separate Messages API request using a Sonnet-tier Claude model. The release notes are not needed until the following morning, providing approximately 12 hours of acceptable latency.

Your team must reduce the per-token API cost while retaining the same model, prompts, and output quality.

Which approach satisfies all these constraints?

Options:

A.  

Issue the 200 Messages API requests concurrently because parallel execution reduces the per-token price.

B.  

Submit the 200 requests through the Message Batches API with unique custom_id values and retrieve the results after the batch finishes.

C.  

Concatenate all 200 commit messages into one Messages API request because reducing the number of requests always reduces token costs.

D.  

Replace the Sonnet-tier model with a Haiku-tier model to obtain a lower per-token price.

Discussion 0
Questions 7

When researching “renewable-energy adoption,” the web-search agent returns recent statistics showing 35% adoption in 2024, while the document-analysis agent extracts an 18% adoption figure from an internal 2021 report. The synthesis agent incorrectly treats the figures as contradictory instead of recognizing that they may show growth over time. What change would best enable the synthesis agent to interpret such temporal differences correctly?

Options:

A.  

Require subagents to include publication dates and data-collection periods in their structured outputs.

B.  

Configure the web-search agent to return only results published during the previous six months.

C.  

Add a conflict-resolution agent that automatically discards older data whenever a newer value exists for the same metric.

D.  

Instruct the synthesis agent to treat the newest value as authoritative and place all older findings in a separate historical section.

Discussion 0
Questions 8

Your CI pipeline performs security-focused code reviews on approximately 50 pull requests daily, currently costing $150 per day through the synchronous API. Reviews are non-blocking—developers merge after tests pass and address findings in follow-up commits. You are evaluating the Message Batches API because it offers a 50% cost reduction. What factor most determines whether batch processing is appropriate for this use case?

Options:

A.  

Whether your result-processing system can handle reviews arriving in a different order from the order in which they were submitted.

B.  

Whether each review can be structured as a single request without multi-turn refinement.

C.  

Whether review feedback arriving up to 24 hours after pull-request creation remains actionable.

D.  

Whether reducing per-review latency from 30–60 seconds to near-instantaneous delivery matters to your workflow.

Discussion 0
Questions 9

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 occasionally receives responses that don't parse as valid JSON, causing downstream processing failures. The current implementation prompts Claude to return JSON in the response text and then parses it.

What is the most reliable approach to ensure Claude returns valid, schema-compliant structured data?

Options:

A.  

Add explicit formatting instructions to the prompt with JSON examples, emphasizing that Claude must return only valid JSON with no surrounding text.

B.  

Implement a retry loop that catches JSON parse errors and re-prompts Claude with the error details, asking it to correct the malformed output.

C.  

Use regular expressions to locate and extract JSON from the response text, handling cases where Claude includes explanatory text around the JSON block.

D.  

Define the expected structure as a JSON schema and provide it in output_config.format so the API constrains Claude's output to that structure.

Discussion 0
Questions 10

The coordinator provides detailed step-by-step instructions to the web-search subagent, specifying exact search queries, source priorities, and date filters. Production monitoring reveals three issues: (1) the subagent reports “insufficient results” instead of trying alternative approaches when the specified searches fail, (2) research quality drops for emerging topics that do not match expected patterns, and (3) the subagent rarely surfaces valuable tangential sources. What is the most effective way to improve subagent adaptability?

Options:

A.  

Specify research objectives and quality criteria—such as coverage breadth, source diversity, and recency—rather than prescribing procedural steps, allowing the subagent to determine its search strategy.

B.  

Remove procedural details entirely and delegate using simple goals such as “research this topic thoroughly,” relying on the subagent’s general capabilities.

C.  

Add fallback directives requiring alternative query formulations whenever the specified searches produce fewer than a predetermined number of results.

D.  

Classify each topic as either “well-defined” or “exploratory” and use a different instruction style for each category.

Discussion 0
Questions 11

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.

After the web-search agent finds 25 sources containing 120,000 tokens of raw content, the document-analysis agent extracts 15,000 tokens of key insights, and the synthesis agent produces a coherent 3,000-token narrative draft, the coordinator must pass context to the report-generation agent for the final output with proper source citations.

What context-passing strategy provides the best balance of completeness and efficiency?

Options:

A.  

Pass the synthesis draft together with a structured source index that maps key claims to their source URLs and relevant excerpts.

B.  

Pass the full accumulated context from all prior agents.

C.  

Pass only the synthesis draft and have a separate post-processing pipeline match claims to sources and insert citations after the report is generated.

D.  

Pass a condensed summary of all prior stages that preserves the main findings and attributes them to sources by name only.

Discussion 0
Questions 12

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.

Compliance requires that refunds exceeding $500 must automatically escalate to a human agent—this rule cannot be left to model discretion. Despite clear system prompt instructions, production logs show the agent occasionally processes high-value refunds directly (3% failure rate).

How should you achieve guaranteed compliance?

Options:

A.  

Add few-shot examples to the prompt showing correct escalation behavior at various refund amounts ($400, $500, $600).

B.  

Strengthen the system prompt with emphatic language: “CRITICAL POLICY: Refunds over $500 MUST trigger human escalation. NEVER process these directly.”

C.  

Modify the refund tool to return an error with message “Amount exceeds policy limit—please escalate” when the threshold is exceeded.

D.  

Implement a hook to intercept tool calls, when the refund process amount exceeds $500, block it and invoke human escalation.

Discussion 0
Questions 13

During testing, when a customer says, “I need a refund for my recent purchase,” the agent immediately invokes process_refund but populates the required order_id parameter with a plausible-looking fabricated value instead of first calling lookup_order. The refund fails because the invented order identifier does not exist. Which change directly addresses the root cause of the fabricated order_id?

Options:

A.  

Update the process_refund tool description to state explicitly that order_id must come from a successful lookup_order result and must never be assumed, inferred, or invented.

B.  

Change tool_choice from auto to any so Claude must call a tool on every turn.

C.  

Add server-side validation that checks whether order_id exists before attempting the refund and returns an error when it does not.

D.  

Preprocess customer messages to extract any mentioned order identifiers and inject them into the conversation before sending the request to Claude.

Discussion 0
Questions 14

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?

Options:

A.  

Spawn a sub-agent to explore physics independently, then manually synthesize its findings with the rendering knowledge accumulated in the main conversation.

B.  

Use /clear to reset context completely, then start fresh with physics exploration using file paths from the project’s CLAUDE.md.

C.  

Summarize key rendering findings, then spawn a sub-agent for physics exploration with that summary in its initial context.

D.  

Continue in the current context with more targeted prompts referencing the specific classes by name.

Discussion 0
Questions 15

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.

After the web-search and document-analysis subagents complete their tasks, the coordinator needs to spawn the synthesis subagent to synthesize the findings.

What is the correct approach for providing the synthesis subagent with the information it needs?

Options:

A.  

Provide the subagent with tool definitions that allow it to request outputs from other subagents through callbacks.

B.  

Include the complete findings from both subagents directly in the synthesis subagent’s prompt.

C.  

Spawn the subagent with only a brief task description, relying on automatic context inheritance from the coordinator.

D.  

Pass reference identifiers and configure the subagent with read access to a shared memory store where the other subagents deposited their results.

Discussion 0
Questions 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 tool's JSON schema has 12 fields with detailed descriptions. Each document is sent in its own request with a 200-token system prompt, and documents average 800 tokens, which led to a pre-launch estimate of about 1,000 input tokens per request. After the first week, usage.input_tokens averages about 3,900 per request.

What is the most likely explanation?

Options:

A.  

Ticket text tokenizes less efficiently than estimated because of special characters and non-English content.

B.  

Tokens generated for the tool call are being reported as input tokens.

C.  

Prompt caching is not enabled, so the system prompt is counted at full weight each time.

D.  

The tool definition is sent with every request and counts toward input tokens.

Discussion 0
Questions 17

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 coordinator agent has AgentDefinition objects configured for all four specialized subagents, each with appropriate descriptions, prompts, and tool restrictions. During testing, you notice that the coordinator correctly reasons about when to delegate—it generates messages such as, “I’ll ask the web-search agent to find sources on this topic”—but no subagent execution ever occurs. The coordinator then proceeds as if the delegation happened and continues with incomplete information. Logs show no errors.

What is the most likely cause?

Options:

A.  

The AgentDefinition objects are configured correctly, but the coordinator’s system prompt does not explicitly list the available subagent types, preventing the model from knowing that they can be invoked.

B.  

Subagent context isolation means task descriptions from the coordinator do not automatically reach subagents; you must configure explicit context forwarding in ClaudeAgentOptions.

C.  

The coordinator’s allowedTools configuration does not include Agent—formerly named Task—so it cannot invoke the tool required to spawn subagents.

D.  

The coordinator’s max_tokens setting is too low, causing the subagent tool invocation to be truncated before the subagent type can be specified.

Discussion 0
Questions 18

After deploying automated code review, developers report that approximately 35% of flagged findings are false positives falling into consistent patterns: style suggestions contradicting team conventions, security warnings for patterns that are safe in your deployment context, and performance suggestions that would degrade your specific use case. You want to reduce false positives while maintaining the ability to catch genuine issues. Which approach best enables the model to generalize its judgment to novel code patterns it has not seen before?

Options:

A.  

Implement post-processing that uses keyword matching to filter out findings containing terms such as “convention,” “context-dependent,” or “trade-off.”

B.  

Include few-shot examples in your prompt showing annotated code snippets that distinguish acceptable patterns from genuine issues in each category.

C.  

Create a comprehensive written specification of all patterns that should not be flagged, and then include the full documentation in the system prompt.

D.  

Add instructions to your system prompt to “be conservative,” “only flag definite issues,” and “consider that some patterns may be intentional.”

Discussion 0
Questions 19

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 pipeline uses a tool called extract_metadata with a JSON schema for paper details. You’ve also defined lookup_citations and verify_doi tools for enrichment. During testing, you notice that when users include requests like “extract the metadata and tell me how cited it is,” Claude sometimes calls lookup_citations first, which fails because it needs the DOI that extract_metadata would provide.

What’s the most effective way to ensure structured metadata extraction happens first?

Options:

A.  

Set tool_choice to {"type": "tool", "name": "extract_metadata"} and process the enrichment requests in subsequent turns after receiving the extracted metadata.

B.  

Set tool_choice to "auto" and reorder the tool definitions so extract_metadata appears first in the tools array, since Claude prioritizes earlier-listed tools.

C.  

Set tool_choice to {"type": "tool", "name": "extract_metadata"} for every API call in the pipeline, ensuring Claude always extracts metadata before any enrichment can occur.

D.  

Set tool_choice to "any" so Claude must use a tool, combined with system prompt instructions prioritizing extract_metadata .

Discussion 0
Questions 20

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 coordinator provides detailed step-by-step instructions to the web-search subagent, specifying exact search queries, source priorities, and date filters. Production monitoring reveals three issues: (1) the subagent reports “insufficient results” rather than trying alternative approaches when the pre-specified searches fail, (2) research quality drops for emerging topics that do not match expected patterns, and (3) the subagent rarely surfaces valuable tangential sources.

What is the most effective way to improve subagent adaptability?

Options:

A.  

Specify research goals and quality criteria—coverage breadth, source diversity, and recency—rather than procedural steps, allowing the subagent to determine its search strategy.

B.  

Remove procedural details entirely, delegating with simple goals such as “research X thoroughly” and relying on the subagent’s general capabilities.

C.  

Add explicit fallback directives to the detailed instructions: “If specified searches yield fewer than N results, attempt alternative query formulations before reporting failure.”

D.  

Implement a topic-classification step where the coordinator categorizes requests as “well-defined” or “exploratory” and uses different instruction styles for each category.

Discussion 0
Questions 21

A developer uses Claude Code to refactor a function during a development session. Before committing, the developer asks the same Claude session to review the code for issues. Later, a separate automated CI review catches several bugs that the same-session review missed. What best explains this discrepancy?

Options:

A.  

Claude retains context about its prior reasoning in the session, making it less likely to question its own decisions.

B.  

The CI review uses a more specific prompt tailored to catching bugs, while the developer’s request was too general.

C.  

The CI environment has access to the complete codebase, while the local session can see only the current file.

D.  

The extended session caused the context window to fill with conversation history, leaving insufficient capacity for thorough analysis.

Discussion 0
Questions 22

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.

Discussion 0
Questions 23

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.

A customer returns 4 hours after their initial session about the same billing dispute. The previous 32-turn session contains lookup_order results showing “Status: PENDING, Expected resolution: 24–48 hours.” In testing, you observe that when resuming sessions with stale tool results, the agent often references the outdated data in responses (e.g., “I see your refund is still being processed”) even after subsequent fresh tool calls return different information.

What approach most reliably handles returning customers?

Options:

A.  

Resume with full history and configure the agent to automatically re-call all previously used tools at session start to ensure data freshness.

B.  

Resume with full history and add a system prompt instruction telling the agent to always prefer the most recent tool results when multiple calls to the same tool exist in context.

C.  

Resume with full history but filter out previous tool_result messages before resuming, keeping only the human/assistant turns so the agent must re-fetch needed data.

D.  

Start a new session, inject a structured summary of the previous interaction (issue type, actions taken, resolution status), then make fresh tool calls before engaging.

Discussion 0
Questions 24

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.

Your test generation produces unit tests for new code, but reviews show that 55% are low-value: trivial assertions that only verify functions do not throw exceptions, tests duplicating existing coverage, or tests ignoring your team’s fixture conventions.

How do you reduce the rate of low-value tests being generated in the first place?

Options:

A.  

Implement two-phase generation in which a second Claude call scores each test against quality criteria, filtering out low-scoring tests before presenting results to developers.

B.  

Add post-generation coverage analysis that automatically filters out any generated test that does not increase line coverage beyond existing tests.

C.  

Restrict test generation to directories where historical quality metrics show higher acceptance rates, disabling it for areas where generated tests consistently require substantial editing.

D.  

Document testing standards in CLAUDE.md, including valuable-test criteria, available fixtures and their intended use cases, and examples distinguishing meaningful behavioral tests from trivial assertions.

Discussion 0
Questions 25

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.

Discussion 0
Questions 26

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, and Glob—and integrates with Model Context Protocol (MCP) servers.

An engineer sees the unfamiliar error message SYNC_CONFLICT: entity version mismatch detected in production logs but does not know which of the 12 services in the codebase generates it. The engineer asks the agent to locate the responsible source code.

What exploration approach will find the responsible code most efficiently?

Options:

A.  

Use Grep to search for distinctive text from the error message, such as SYNC_CONFLICT or entity version mismatch , and then read the matching files to understand the context.

B.  

Use Glob to find files in directories commonly associated with error handling, such as errors , exceptions , or handlers , and then read every matching file.

C.  

Read the project’s README and service-configuration files, and then systematically read source files in every service directory.

D.  

Use Grep to locate every file importing the project’s error-handling module, and then read those files to find custom error definitions.

Discussion 0
Questions 27

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.

A developer uses Claude Code to refactor a function during a development session. Before committing, the developer asks the same Claude session to review the code for issues. Later, a separate automated CI review catches several bugs that the same-session review missed.

What best explains this discrepancy?

Options:

A.  

Claude retains the implementation context and prior decisions in the session, making it less likely to challenge assumptions underlying its own changes.

B.  

The session’s context window necessarily became full, leaving insufficient capacity for meaningful review.

C.  

The CI review must have used a more specific prompt, while the developer’s review request was too general.

D.  

The CI environment can access the full repository, while a local Claude Code session can access only the current file.

Discussion 0
Questions 28

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.

Your CI pipeline performs security-focused code reviews on approximately 50 pull requests daily, currently costing $150 per day using the synchronous API. Reviews are non-blocking—developers merge after tests pass and address findings in follow-up commits. You are evaluating the Message Batches API for its 50% cost reduction.

What factor most determines whether batch processing is appropriate for this use case?

Options:

A.  

Whether reducing per-review latency from 30–60 seconds to near-instant matters for your workflow.

B.  

Whether your result-processing system can handle reviews arriving in a different order from the order in which they were submitted.

C.  

Whether review feedback arriving up to 24 hours after pull-request creation remains actionable.

D.  

Whether you can structure each review as a single request without multi-turn refinement.

Discussion 0
Questions 29

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.

In production, you observe that simple fact-checking queries, such as “In what year was the Paris Climate Agreement signed?”, traverse all four subagents sequentially, consuming more than 40 seconds and significant tokens per query. Complex comparative research benefits from the complete pipeline. Your query distribution is diverse and continues to evolve as users discover new applications.

What is the most effective approach to optimize for varying query complexity?

Options:

A.  

Create a fast path for factual questions that bypasses subagents entirely, routing every other query through the complete pipeline.

B.  

Train a query-complexity classifier using labeled historical data to predict the optimal subagent combination, retraining it periodically.

C.  

Implement pattern-based routing that classifies queries as single-fact, comparative, or analytical and maps each category to a predefined subagent combination.

D.  

Have the coordinator analyze each query and dynamically determine which subagents are required.

Discussion 0
Questions 30

The coordinator agent has AgentDefinition objects configured for all four specialized subagents, each with appropriate descriptions, prompts, and tool restrictions. During testing, you notice that the coordinator correctly reasons about when to delegate—it generates messages such as, “I’ll ask the web-search agent to find sources on this topic”—but no subagent execution occurs. The coordinator then proceeds as if the delegation happened and continues with incomplete information. Logs show no errors. What is the most likely cause?

Options:

A.  

The AgentDefinition objects are configured correctly, but the coordinator’s system prompt does not explicitly list the available subagent types.

B.  

The coordinator’s allowedTools configuration does not include "Agent"—called "Task" in older SDK releases—so it cannot invoke the tool required to spawn subagents.

C.  

Subagent context isolation prevents task descriptions from reaching subagents unless explicit context forwarding is configured in ClaudeAgentOptions.

D.  

The coordinator’s max_tokens setting is too low, causing the subagent invocation to be truncated before the agent-type parameter is specified.

Discussion 0
Questions 31

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.

Your automated review generates many findings per pull request, but developer feedback shows that approximately half are dismissed as “not worth addressing.” Analysis reveals that these findings are often technically accurate but involve minor style preferences or patterns that are acceptable in the project.

Before adding infrastructure complexity, what prompt-design change would most effectively reduce dismissals while maintaining detection of genuine issues?

Options:

A.  

Add a secondary classification model that filters findings according to predicted developer acceptance.

B.  

Ask Claude to rate each finding’s confidence from 1 to 10 and include only findings rated 8 or higher.

C.  

Define explicit reporting criteria that distinguish reportable bugs and security issues from minor style preferences and accepted local patterns.

D.  

Add the instruction: “Only report findings you are highly confident are genuine problems.”

Discussion 0
Questions 32

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?

Options:

A.  

Launch a fresh subagent with a summary of prior findings.

B.  

Resume the subagent from its previous transcript without mentioning the changes—the architecture understanding remains valid.

C.  

Resume the subagent from its previous transcript and inform it about the renamed functions.

D.  

Launch a fresh subagent and include the prior transcript in the initial prompt for context.

Discussion 0
Questions 33

When implementing your lookup_order MCP tool, the backend sometimes returns errors—for example, “Order not found” or temporary database failures. What is the correct pattern for communicating these errors back to the agent?

Options:

A.  

Return the error message in the tool-result content with the isError flag set to true.

B.  

Return a successful response with a status field indicating the error type.

C.  

Log the error server-side and return an empty result to avoid confusing the model.

D.  

Throw an exception from the tool handler so the agent framework can catch and log it.

Discussion 0
Questions 34

After investigating a billing dispute for more than 25 turns, you determine that duplicate charges resulted from a payment-gateway timeout triggering retry logic. The required refund of $847 exceeds your $500 authorization limit, so you must invoke escalate_to_human. The human agent will not have access to the conversation transcript. What context should you pass to enable effective resolution?

Options:

A.  

The complete conversation transcript containing every message and tool result.

B.  

The customer’s original complaint verbatim together with excerpts from the tool results showing the duplicate transactions.

C.  

A structured summary containing the customer identifier, verified root cause, refund amount, relevant transaction identifiers, actions already attempted, and recommended next action.

D.  

Only the diagnosis and refund amount.

Discussion 0
Questions 35

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.

Discussion 0
Questions 36

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.

Your automated review jobs take 18 seconds to initialize before Claude begins analyzing code. Profiling reveals that the delay results from automatically discovering hooks, MCP servers, plugins, skills, and multiple nested CLAUDE.md files throughout the monorepo.

You need to reduce startup time while ensuring reviews still enforce the coding standards documented in the root-level CLAUDE.md file.

What is the most effective approach?

Options:

A.  

Replace the default prompt using --system-prompt-file ./CLAUDE.md, which bypasses default prompt assembly and loads only the project rules.

B.  

Run in --bare mode and pass --append-system-prompt-file ./CLAUDE.md to load the required project standards explicitly while skipping automatic discovery.

C.  

Run in --bare mode and repeat all review criteria directly in the -p prompt for every invocation.

D.  

Keep the default initialization and add --exclude-dynamic-system-prompt-sections to improve prompt-cache reuse across CI runners.

Discussion 0
Questions 37

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 is configuring MCP servers in Claude Code. You want to add a shared venue lookup server that all team members should have access to, and you personally want to add an experimental music playlist server that only you are testing.

Which configuration approach correctly applies MCP server scopes?

Options:

A.  

Add both servers to your local ~/.claude.json .

B.  

Add the venue server to .mcp.json and the playlist server to ~/.claude.json .

C.  

Add the venue server to ~/.claude.json and the playlist server to .mcp.json .

D.  

Add both servers to the project-level .mcp.json file.

Discussion 0
Questions 38

Your automated reviewer uses a single prompt covering security issues, API design, and business-logic correctness. Your evaluation suite shows strong recall for API-design findings at 82% but poor recall for business-logic edge cases in quiz scoring at 34%. When you add few-shot examples of logic bugs to the prompt, logic recall improves to 41%, but API-design recall drops to 68%. How should you address this trade-off to improve detection across both categories?

Options:

A.  

Provide the full repository as context instead of only the changed files and surrounding code, giving the model deeper visibility into business-logic patterns.

B.  

Replace the few-shot examples with a detailed checklist of specific logic edge cases to verify, such as division by zero in score calculations and boundary conditions in grading thresholds.

C.  

Split the review into separate focused prompts—one for security and API design and another for business logic—each with dedicated examples, and then consolidate the findings before posting.

D.  

Upgrade to a more capable model tier because its stronger reasoning will handle both concern types in a single prompt and eliminate the recall trade-off.

Discussion 0
Questions 39

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.

Discussion 0
Questions 40

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.

A customer contacts the agent about a warranty claim on a power drill. Resolving this requires multiple sequential tool calls: get_customer to look up their account, lookup_order to find the purchase details, and then either process_refund or escalate_to_human depending on warranty eligibility. You’re implementing the agentic loop that orchestrates these steps using the Claude API.

What is the primary mechanism your application uses to determine whether to continue the loop or stop?

Options:

A.  

You check whether Claude’s response contains a text content block—if text is present, the agent has produced its final answer and the loop should exit.

B.  

You manually set the tool_choice parameter to "none" after the final expected tool call to force Claude to stop requesting tools.

C.  

You check the stop_reason field in each API response—the loop continues while it equals "tool_use" and exits when it changes to "end_turn" or another terminal value.

D.  

You track the number of tool calls made and exit the loop once a preconfigured maximum is reached.

Discussion 0
Questions 41

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.

When analyzing complex legal cases that cite multiple precedents, the document-analysis subagent processes each precedent sequentially. A landmark case citing 12 precedents takes more than three minutes to analyze completely.

What is the most effective way to reduce this latency while preserving the coordinator’s ability to monitor and debug the system?

Options:

A.  

Implement a message queue where precedent-analysis tasks are processed asynchronously by a pool of worker agents.

B.  

Enable the document-analysis subagent to spawn its own specialized subagents dynamically when it encounters cases with many citations.

C.  

Have the coordinator spawn parallel document-analysis subagents, each handling a subset of precedents, and then aggregate the results before synthesis.

D.  

Create a recursive agent hierarchy where analysis agents subdivide work among child agents until reaching single-precedent granularity.

Discussion 0
Questions 42

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.

Discussion 0
Questions 43

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.

Your automated review calls the Claude API for each pull request, using tool_use with a report_findings tool that returns a JSON array of finding objects. Each object contains file_path, line_number, severity, category, and description. During testing on a large pull request touching more than 30 files, the response reaches the max_tokens limit and is truncated in the middle of the JSON, causing your pipeline’s parser to fail.

What is the most effective way to handle this?

Options:

A.  

Split the review into multiple API calls that each analyze a subset of the changed files, and then merge the resulting findings arrays.

B.  

Increase max_tokens to the model’s maximum and instruct Claude to keep each finding description under 50 words.

C.  

Switch from tool_use to prompting Claude to return findings as a Markdown list.

D.  

Add retry logic that detects truncated JSON and resends the request with instructions to report only critical and high-severity findings.

Discussion 0
Questions 44

Your automated review generates many findings per pull request, but developer feedback shows that roughly half are dismissed as “not worth addressing.” Analysis reveals that dismissed findings are often technically accurate but involve minor style preferences or patterns that are acceptable in your codebase. Before adding infrastructure complexity, what prompt-design change could most effectively reduce dismissals while maintaining the detection of genuine issues?

Options:

A.  

Add explicit criteria defining which issues to report, such as bugs and security defects, and which issues to skip, such as minor style preferences and accepted local patterns.

B.  

Implement a secondary classification model that filters Claude’s findings according to predicted developer acceptance.

C.  

Ask Claude to rate every finding’s confidence from 1 to 10 and include only findings rated 8 or higher.

D.  

Append instructions telling Claude to “only report findings you are highly confident are genuine problems.”

Discussion 0
Questions 45

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, and Glob—and integrates with Model Context Protocol (MCP) servers.

An engineer asks the agent to understand how the caching layer works before adding a new cache-invalidation trigger. Initial Grep searches show that caching logic spans 15 files containing decorators, middleware, and service classes—approximately 8,000 lines in total.

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

Options:

A.  

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

B.  

Use Glob to find files matching common caching patterns such as *cache*.py or caching/ , read the largest files first, and inspect smaller files afterward.

C.  

Use Read to load all 15 files sequentially and build a complete understanding of the caching implementation.

D.  

Use Grep to search for invalidate and expire , and then read only the matching line ranges with minimal surrounding context.

Discussion 0
Questions 46

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 processes two document types: standard monthly reports, which are archived after processing, and urgent exception reports, which must trigger business alerts within 30 minutes of receipt. Both use the same JSON schema. You want to minimize API costs while meeting the latency requirements.

How should you architect the processing pipeline?

Options:

A.  

Submit all documents to the Message Batches API with custom_id values for tracking. When results arrive, immediately process urgent documents and trigger delayed alerts for exceptions.

B.  

Route standard reports to the Message Batches API for 50% cost savings, and route urgent exception reports to the real-time Messages API.

C.  

Queue all documents and submit hourly batches, flagging urgent documents for expedited handling when batch results return.

D.  

Submit all documents to the real-time Messages API to ensure consistent processing latency across document types.

Discussion 0