[Q16-Q35] 100% Guaranteed Results CCAR-F Unlimited 62 Questions [2026]

Share

100% Guaranteed Results CCAR-F Unlimited 62 Questions [2026]

CCAR-F Dumps PDF - Want To Pass CCAR-F Fast

NEW 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.
Testing reveals that when source documents are missing certain specifications, the model fabricates plausible- sounding values to satisfy your schema's required fields. For example, a document mentioning only dimensions receives a fabricated "weight: 2.3 kg" in the extraction output.
What schema design change most effectively addresses this hallucination behavior?

  • A. Change fields that may not exist in source documents from required to optional, allowing the model to omit them.
  • B. Add a "confidence" field alongside each specification where the model self-reports its certainty, then filter out low-confidence extractions.
  • C. Implement semantic validation that verifies each extracted value appears in or can be inferred from the source document text.
  • D. Add explicit instructions to the prompt stating "only extract information explicitly stated in the document; use placeholder text for missing values."

Answer: A

Explanation:
The schema is creating a structural incentive for fabrication. When a field is declared required, the output must contain a value even when the source document contains no corresponding evidence. Structured Outputs can guarantee that Claude's response conforms to a JSON Schema, but schema conformance does not establish that every generated value is factually supported. Anthropic's documentation shows that the required array determines which properties must be present; therefore, source-dependent properties that may legitimately be absent should not be included as required fields. ( https://platform.claude.com/docs/en/build- with-claude/structured-outputs ) Option B corrects the problem at the contract level. Claude can omit the unavailable property rather than inventing content merely to produce valid JSON. A nullable representation could also be used when downstream systems require a stable key set, but forcing an unsupported non-null value is architecturally unsound.
Option A still requires placeholder generation and does not resolve the mismatch between the schema and available evidence. Option C relies on model-generated confidence, which is not a substitute for grounding.
Option D is a useful secondary control, but it does not constitute the requested schema-design change.
Anthropic recommends allowing uncertainty and requiring factual claims to be grounded in the provided material. ( https://docs.anthropic.com/en/docs/test-and-evaluate/strengthen-guardrails/reduce-hallucinations ) Official references/topics: Structured Outputs-JSON Schema design; Reduce Hallucinations-allowing uncertainty and grounding claims.


NEW QUESTION # 17
You are using Claude Code to accelerate software development. Your team uses it for code generation, refactoring, debugging, and documentation. You need to integrate it into your development workflow with custom slash commands, CLAUDE.md configurations, and understand when to use plan mode vs direct execution.
Your infrastructure-as-code repository includes Terraform modules ( /terraform/ ), Kubernetes manifests (
/kubernetes/ ), and CI/CD pipeline scripts ( /pipelines/ ). Each requires different conventions, but your single root CLAUDE.md has grown to 500+ lines. When developers work on Kubernetes files, Terraform-specific rules load into context unnecessarily, consuming tokens.
What is the best approach to reorganize so only relevant guidance loads when editing specific file types?

  • A. Create files in .claude/rules/ with YAML frontmatter path-scoping (e.g., paths: ["terraform/**/*.tf"] ), loading rules only when editing matching files.
  • B. Keep the root CLAUDE.md and use @path/to/import syntax to modularly include tool-specific guidance files from separate documents.
  • C. Split content into subdirectory CLAUDE.md files ( /terraform/CLAUDE.md , /kubernetes/CLAUDE.
    md ), so Claude loads directory-specific guidance.
  • D. Restructure the root CLAUDE.md into clearly labeled sections with headers (e.g., "## Terraform Conventions"), improving organization and readability.

Answer: A

Explanation:
Path-scoped rules directly satisfy the requirement that instructions load only when Claude works with matching files. Each infrastructure domain can have a separate Markdown file under .claude/rules/ , with YAML paths frontmatter targeting Terraform files, Kubernetes manifests, or pipeline configuration.
Anthropic documents that .claude/rules/ keeps project guidance modular and supports conditional loading based on glob patterns. Rules with a paths field apply only when Claude works with matching files, reducing irrelevant context and token consumption. Rules without path frontmatter load unconditionally. ( https://code.
claude.com/docs/en/memory )
Option B improves readability but leaves all 500-plus lines in every session. Option C can provide directory- specific CLAUDE.md guidance, but path-scoped rules are more precise when conventions depend on extensions or patterns spanning multiple directories. Option D still requires manual imports and does not provide the documented conditional rule-loading mechanism.
A suitable design would use rules such as terraform.md scoped to terraform/**/*.tf , kubernetes.md scoped to kubernetes/**/*.{yaml,yml} , and pipelines.md scoped to the pipeline directory. Broad project-wide commands and repository etiquette can remain in the root CLAUDE.md.
Official references/topics: .claude/rules/ ; Path-Specific Rules; YAML Frontmatter; Context-Efficient Instruction Loading.


NEW 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.
The agent verifies customer identity through a multi-step process before resetting passwords. During testing, you notice that after the customer answers the third verification question, the agent asks them to provide their name again, as if the earlier exchange never happened.
What's the most likely cause of this behavior?

  • A. The verification tool is clearing the agent's internal state after each successful validation step.
  • B. The prompt lacks instructions telling Claude to remember information across multiple exchanges.
  • C. Claude's memory retention is limited to two conversational turns by default, requiring explicit configuration to extend it.
  • D. The conversation history isn't being passed in subsequent API requests.

Answer: D

Explanation:
The Claude Messages API is stateless. Each API request must include the conversation history that Claude requires for the current response. If the application sends only the customer's third verification answer, Claude does not automatically retrieve the earlier turns containing the customer's name and previous answers.
From the model's perspective, that information is absent.
Anthropic's Messages API documentation states that applications must send the full conversational history to build a multi-turn interaction. The correct implementation appends each user message and assistant response to the messages array and resends the accumulated sequence on every subsequent request. ( https://platform.
claude.com/docs/en/build-with-claude/working-with-messages )
Option A cannot restore information that was omitted from the request. Instructions to "remember" do not create server-side conversational state. Option C describes application-specific behavior for which the scenario provides no evidence. Option D is factually incorrect: Claude does not have a default two-turn retention limit. Its effective conversational awareness depends on the messages provided and the model's context window.
For a verification workflow, the application should also persist structured verification state separately from prose history. That state may include completed checks, pending checks, attempt counts, and a verified customer identifier. This improves reliability while the conversational transcript preserves the natural interaction.
Official references/topics: Stateless Messages API, multi-turn history construction, structured workflow state, conversational continuity.


NEW QUESTION # 19
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 has connected a custom MCP server that provides DevOps workflow templates. The server exposes several MCP prompts (such as deploy_checklist and incident_response ) in addition to tools.
How do these MCP prompts become accessible within Claude Code?

  • A. They appear as slash commands (e.g., /mcp__servername__deploy_checklist ) that you can invoke, with arguments passed after the command name.
  • B. They are added to Claude Code's tool registry alongside the server's tools, invoked automatically by the model when relevant to the task.
  • C. They are automatically prepended to every conversation as additional system-level context, influencing Claude's behavior throughout the session.
  • D. They are surfaced as @ -mentionable resources alongside files, fetched and attached to your message when referenced.

Answer: A

Explanation:
MCP prompts are exposed as user-invoked commands rather than autonomous tools or permanently loaded system instructions. Claude Code dynamically discovers prompts from connected MCP servers and displays them in the command list using the naming convention /mcp__servername__promptname .
Arguments are supplied as space-separated values after the command. When executed, the MCP server resolves the prompt and its returned content is injected into the active conversation. Anthropic's official documentation provides examples such as /mcp__github__list_prs and /mcp__jira__create_issue "Bug in login flow" high . ( https://code.claude.com/docs/en/mcp ) Option A would consume context continuously and incorrectly treat optional workflow templates as mandatory system instructions. Option B confuses MCP prompts with MCP tools: tools are model-callable operations, while prompts are reusable prompt templates invoked as commands. Option C describes MCP resources, which can be referenced and attached but are a distinct MCP capability.
For the stated server, the team could invoke commands such as /mcp__devops__deploy_checklist or
/mcp__devops__incident_response service-name . The exact server segment is derived from the configured server name, with normalization applied where necessary.
Official references/topics: MCP Prompts; Dynamic Prompt Discovery; MCP Slash-Command Naming; Prompt Arguments.


NEW QUESTION # 20
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?

  • 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. 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.
  • D. 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.

Answer: B

Explanation:
Option B removes the ambiguity from the tool interface itself. The agent no longer needs to choose between separate functions that represent closely related business operations. Instead, a single compensation tool exposes an explicit action parameter, while the existing order lookup tool can optionally return delivery- tracking information through a clearly defined flag.
Anthropic's tool-design guidance recommends consolidating related operations into fewer, more capable tools when separate functions create unnecessary semantic overlap. Claude selects tools primarily from their names, descriptions, schemas, and the current task. When multiple tools appear capable of satisfying the same request, selection accuracy declines because the agent must infer distinctions that should have been made explicit in the interface design.
Option A adds routing complexity but leaves overlapping financial operations available within the same sub- agent. Option C reduces the number of tools loaded initially, but it does not eliminate the semantic duplication between compensation operations or overlapping lookup functions. Option D may improve behavior through examples, but it compensates for a poorly designed tool surface rather than correcting the root cause.
The consolidated schemas should use enums for supported actions, clearly define when each action applies, and document the returned fields. This creates a smaller and more deterministic agent-computer interface.
Official references/topics: Tool consolidation, semantic tool boundaries, action parameters, MCP tool- selection accuracy.


NEW QUESTION # 21
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 has been running for 3 weeks and human reviewers have corrected 847 extractions. Analysis reveals a recurring pattern: when recipes use informal measurements like "a handful" or "a splash," the model either invents specific amounts or leaves fields empty-accounting for 23% of all corrections.
How should you use this feedback to improve extraction accuracy?

  • A. Add few-shot examples to your prompt demonstrating correct handling of informal measurements- extracting them verbatim rather than converting or omitting them.
  • B. Implement a post-processing layer that uses pattern matching to detect informal measurement phrases in source text and automatically populate values when the extraction is empty.
  • C. Update your JSON schema to add a "measurement_type" enum field (precise/informal).
  • D. Fine-tune the model on the 847 corrected extractions.

Answer: A

Explanation:
The reviewer corrections have exposed a narrow and repeatable interpretation failure. The desired policy is clear: informal measurements are valid source values and must be preserved verbatim rather than normalized into invented quantities or treated as missing. This behavior can be communicated efficiently through targeted few-shot examples.
Anthropic recommends examples for demonstrating expected behavior and improving consistency. Examples can pair source phrases such as "a handful of spinach," "a splash of vinegar," and "a pinch of salt" with outputs that retain handful , splash , and pinch exactly. Additional counterexamples can show that Claude must not convert these phrases into grams, millilitres, or estimated serving quantities. ( https://docs.anthropic.
com/en/docs/about-claude/use-case-guides/ticket-routing )
Option A introduces a substantially heavier training workflow for a problem that can be addressed directly through the prompt. Option C creates a parallel extraction mechanism based on pattern matching; it will be brittle across linguistic variations and may populate a value without understanding its relationship to the correct ingredient. Option D adds useful classification metadata, but it does not instruct Claude to preserve the original measurement instead of inventing or omitting it.
The revised prompt should combine an explicit verbatim-extraction rule with several varied examples derived from the corrected cases, followed by regression evaluation against the identified failure set.
Official references/topics: Few-Shot Examples, Feedback-Driven Prompt Improvement, Verbatim Extraction, Regression Evaluation.


NEW QUESTION # 22
You are building developer productivity tools using the Claude Agent SDK. The agent helps engineers explore unfamiliar codebases, understand legacy systems, generate boilerplate code, and automate repetitive tasks. It uses the built-in tools (Read, Write, Bash, Grep, Glob) and integrates with Model Context Protocol (MCP) servers.
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?

  • 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. You must specify which MCP server to use for each turn, and the agent can only access one server's tools at a time.
  • D. The agent automatically selects the most relevant server based on the request and loads only that server' s tools.

Answer: A

Explanation:
MCP allows a Claude application to connect to multiple servers and expose their enabled tools within the same agentic interaction. Anthropic's MCP connector documentation explicitly supports connecting to multiple MCP servers in one request. Once connected, Claude can invoke a server's tool when the user's request corresponds to the capability described by that tool. ( https://docs.anthropic.com/en/docs/agents-and- tools/mcp-connector ) In this scenario, the git server can provide the branch-creation operation, the documentation server can locate the relevant links, and the Jira server can update ticket JIRA-123. The agent can coordinate these capabilities without requiring a separate conversational turn that restricts it to only one server. Tool descriptions and schemas tell Claude what each operation does and what inputs it requires.
Option B incorrectly describes sequential capability discovery. Server identity and tool definitions are established through the MCP configuration rather than discovered by querying every server for each operation. Option C is incorrect because connecting several servers does not inherently restrict the agent to a single selected server. Option D imposes a one-server-per-turn limitation that MCP does not require.
Access can still be controlled through allowlists, denylists, permissions, and per-tool configuration. Those controls restrict which tools are enabled; they do not change the fundamental ability to make tools from multiple configured servers available together.
Official references/topics: MCP Server Configuration, Multi-Server Tool Access, Tool Discovery, MCP Tool Permissions.


NEW QUESTION # 23
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've asked Claude Code to build a PDF report generation feature. The initial implementation queries the database correctly, but the output has formatting issues: table columns are too narrow causing content truncation, dates display without proper formatting, and page break handling is incorrect. You've noticed these issues interact-changing column widths affects how dates render, and page breaks depend on content height.
What's the most effective approach for iterating toward a working solution?

  • A. Start fresh with a detailed prompt specifying all formatting requirements upfront.
  • B. Provide all three issues in a single detailed message with exact specifications for each, allowing Claude to address them together in one update.
  • C. Show Claude an example of a correctly formatted report and ask it to match that output, rather than listing the specific technical issues.
  • D. Address the column width issue first with specific measurements, verify it works, then fix date formatting within the corrected columns, then adjust page breaks-testing after each change.

Answer: D

Explanation:
The defects are coupled, so changing all three simultaneously would make it difficult to determine which modification caused an improvement or regression. Option C establishes a controlled sequence: correct the foundational column geometry, verify the resulting layout, format dates within the stabilized columns, and finally tune page breaks using the resulting content heights.
Anthropic recommends tight feedback loops and early course correction. It also advises supplying Claude with an executable or observable verification mechanism, such as a test, build result, generated fixture, or screenshot comparison. Claude can then make a focused change, inspect the output, and iterate until that specific condition is satisfied. ( https://code.claude.com/docs/en/best-practices ) Option A discards useful context from the functioning database implementation. Option B changes multiple interacting variables in one pass, making failures harder to isolate. Option D provides a useful visual target but does not replace precise technical constraints or incremental verification.
Each stage should have explicit acceptance criteria-for example, minimum column widths, expected date strings, and page-break fixtures using short and long content. Once a stage passes, its test becomes a regression guard for subsequent changes.
Official references/topics: Incremental Refinement; Tight Feedback Loops; Observable Verification; Regression Control.


NEW QUESTION # 24
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. Ask Claude to explore your codebase to find and understand the transaction, error handling, and logging patterns before generating the new module.
  • B. Use @ references to include the three modules directly in your prompt, giving Claude concrete code examples of the patterns to follow.
  • 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. Add documentation of each pattern to your CLAUDE.md file, establishing them as project conventions that Claude will apply automatically.

Answer: B

Explanation:
Direct @ references provide Claude with the exact implementations it must imitate. Anthropic documents that referencing a file with @ includes the full file content in the conversation, and multiple files can be referenced in one message. This gives Claude immediate access to the real transaction boundaries, exception structures, audit fields, naming conventions, and helper APIs used by the project. ( https://code.claude.com/docs/en
/common-workflows )
Option B is inappropriate because the task is explicitly one-off and the conventions are already documented elsewhere. CLAUDE.md is loaded into every session and should contain concise information that broadly applies to the project. Adding detailed implementation material for a single integration would consume context unnecessarily. Anthropic recommends moving occasional procedures to skills and keeping CLAUDE.
md limited to persistent, widely applicable guidance. ( https://code.claude.com/docs/en/memory ) Option C loses precision because a natural-language summary may omit subtle but important code behavior.
Option D asks Claude to rediscover files that have already been identified, increasing exploration time and context usage.
The most effective prompt should reference all three modules, identify which pattern each demonstrates, specify the new module's required behavior, and request focused tests proving that the established conventions were followed.
Official references/topics: @ file references, rich prompt context, CLAUDE.md scope, pattern-based implementation.


NEW QUESTION # 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.
After integrating a local MCP server providing code analysis tools ( analyze_dependencies , find_dead_code , calculate_complexity ), you verify the server is healthy and tools appear in the tools/list response. However, you observe that the agent consistently uses Grep to search for import statements instead of calling analyze_dependencies -even when users explicitly ask about "code dependencies." Examining tool definitions reveals:
* MCP analyze_dependencies - "Analyzes dependency graph"
* Built-in Grep - "Search file contents for a pattern using regular expressions. Returns matching lines with line numbers and surrounding context." What's the most effective approach to improve the agent's selection of MCP tools?

  • A. Split analyze_dependencies into granular tools ( list_imports , resolve_transitive_deps , detect_circular_deps ) so each has a focused purpose less likely to overlap with Grep.
  • B. Remove Grep from available tools when the MCP server is connected to eliminate functional overlap.
  • C. Expand MCP tool descriptions to detail capabilities and outputs-e.g., "Builds dependency graph showing direct imports, transitive dependencies, and cycles."
  • D. Add routing instructions to the system prompt specifying that dependency-related questions should use MCP tools rather than Grep.

Answer: C

Explanation:
Claude selects tools principally from their names, descriptions, parameter schemas, and the task context. The current description-"Analyzes dependency graph"-does not explain why the MCP tool is superior to a familiar text search. It omits the tool's scope, the circumstances in which it should be selected, and the structured information it returns.
Anthropic identifies detailed descriptions as the most important factor in tool-use performance. A strong description should state what the tool does, when it should and should not be used, what its parameters mean, and any limitations. Anthropic recommends several sentences for complex tools rather than a short generic label. ( https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/implement-tool-use ) The MCP connector guidance likewise states that Claude selects among available tools using their names and descriptions and that clear, specific descriptions improve selection accuracy. ( https://docs.anthropic.com/en
/docs/agents-and-tools/mcp-connector )
Option B makes the functional distinction explicit: Grep locates textual import statements, whereas analyze_dependencies constructs a semantic graph containing direct and transitive dependencies, cycles, and potentially unresolved references. Option A is a brittle global override. Option C removes a generally useful tool. Option D increases the number of tools and selection ambiguity, contrary to Anthropic's recommendation to consolidate related operations where practical.
Official references/topics: MCP Tool Discovery; Tool Descriptions; Tool Selection Accuracy; Tool-Surface Design.


NEW QUESTION # 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, 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?

  • A. Resume the subagent from its previous transcript without mentioning the changes-the architecture understanding remains valid.
  • B. Resume the subagent from its previous transcript and inform it about the renamed functions.
  • C. Launch a fresh subagent and include the prior transcript in the initial prompt for context.
  • D. Launch a fresh subagent with a summary of prior findings.

Answer: B

Explanation:
Resuming the existing subagent preserves the expensive investigative context: files already inspected, data- flow relationships, hypotheses, and intermediate conclusions. Anthropic documents that session history contains prompts, tool calls, tool results, and responses, allowing an interrupted investigation to continue with its prior analysis intact. ( https://code.claude.com/docs/en/agent-sdk/sessions ) Subagent transcripts also persist within their parent session and can be resumed after an interruption or restart. ( https://code.claude.com
/docs/en/agent-sdk/subagents?utm_source=chatgpt.com )
The engineer must nevertheless disclose the renamed utility functions. Anthropic explicitly distinguishes conversation persistence from filesystem persistence: resuming restores what the agent previously knew, but it does not freeze or snapshot the repository. ( https://code.claude.com/docs/en/agent-sdk/sessions ) Without the update, the subagent may search for obsolete symbols, misinterpret broken references, or rely on stale file paths.
Option A loses the detailed transcript and replaces it with a necessarily compressed summary. Option B preserves context but conceals a material repository change. Option D duplicates a large transcript inside a new context, increasing token consumption without providing any advantage over native resume functionality.
The resumed prompt should name the renamed functions, identify the merge or affected files, and instruct the subagent to re-read only the changed areas before continuing its broader exploration.
Official references/topics: Session Resume; Persistent Subagent Transcripts; Repository Drift; Targeted Context Refresh.


NEW QUESTION # 27
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.
The system needs to extract candidate information (name, contact details, skills, work experience, education) from uploaded resumes. The extracted data must strictly conform to a predefined JSON schema, as missing required fields or incorrect data types will cause downstream validation failures.
What is the most reliable approach to ensure Claude's output consistently matches the schema?

  • A. Include detailed JSON formatting instructions and a template example in the system prompt, asking Claude to output only valid JSON.
  • B. Parse Claude's text response with regex patterns to extract JSON objects, using retry logic for malformed responses.
  • C. Make two separate API calls-first extracting information as text, then asking Claude to format that text as JSON.
  • D. Define a tool with an input schema matching your required JSON structure and extract the data from Claude's tool_use response.

Answer: D

Explanation:
A schema-defined tool provides a structured interface between Claude and the application. The tool's input_schema can declare required properties, nested work-experience and education objects, arrays of skills, and exact data types. Claude then supplies the extracted resume information as tool-call arguments, which the application can read directly from the tool_use response.
Anthropic's tool documentation specifies that a custom tool definition includes a JSON Schema object describing its expected parameters. Current strict tool use can additionally enforce that generated tool arguments match the declared schema exactly. This removes the need to locate JSON inside free-form text or depend on post-generation repair. ( https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/implement- tool-use ) Option A is fragile because regular expressions do not provide a robust parser for arbitrary nested JSON and cannot correct missing properties or incorrect types. Option B improves formatting behavior but remains probabilistic. Option C doubles latency and creates two opportunities for information loss: first during extraction and again during reformatting.
In a production design, fields that may genuinely be absent from a resume should be optional or nullable rather than forcing invented values. The tool schema should also use strict: true where supported. Among the available choices, D provides the strongest structural guarantee and the cleanest downstream integration.
Official references/topics: Tool Use Responses, Input Schemas, Strict Tool Use, Nested Structured Extraction.


NEW QUESTION # 28
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?

  • A. Analyze imports and class hierarchies to identify the base cache class. Read that file to understand the interface, then trace specific invalidation implementations.
  • B. 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.
  • C. Use the Read tool to sequentially load all 15 files, building complete understanding across the full caching implementation.
  • D. Use Grep to search for "invalidate" and "expire" patterns across all files, then Read only those specific line ranges with minimal surrounding context.

Answer: A

Explanation:
The correct objective is to construct an architectural map before consuming the full implementation.
Identifying the base cache abstraction, its interface, and the classes that implement or invoke it gives the agent a dependency-guided path through the code. It can then inspect only the invalidation implementations and integration points relevant to the proposed trigger.
This approach protects the context window. Anthropic states that every file read occupies context and that model performance can deteriorate as the window fills. Its Claude Code guidance warns against unbounded investigation that reads large numbers of files and recommends narrowing the exploration or delegating it. (
https://code.claude.com/docs/en/best-practices )
Option A is too lexical: searching only for invalidate or expire can miss event-driven invalidation, overridden methods, cache-key mutation, and generic interface calls. Option B loads approximately 6,000 lines without first establishing relevance. Option C assumes that filename patterns and file size correlate with architectural importance; the largest files may contain incidental code while a small interface defines the entire design.
Option D follows control and type relationships rather than arbitrary file order. After reading the base class, the agent can search for subclasses, imports, construction sites, middleware hooks, and calls to the invalidation contract, progressively expanding only where evidence requires it.
Official references/topics: Context-Efficient Exploration; Dependency-Guided Reading; Architectural Interfaces; Narrowly Scoped Investigation.


NEW QUESTION # 29
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 citation counts as locale-formatted strings ("1,234") when the schema requires integers.
  • C. 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).
  • D. The model extracts "et al." for co-authors when the full list exists only in an external document not in the input.

Answer: D

Explanation:
Retry-with-error-feedback is effective when the required information is available and the defect concerns representation. Options A, C, and D are correctable formatting failures: the model can flatten an object into an array, remove thousands separators and emit an integer, or convert a datetime into the required date-only format. The validation message supplies enough information to revise the output.
Option B is fundamentally different. The complete co-author list is absent from the model's input and exists only in an external document. No number of retries can recover evidence that was never supplied. Repeated attempts may instead increase the probability of fabrication. Anthropic's hallucination guidance recommends restricting responses to available documents, allowing the model to acknowledge missing information, and withholding or retracting claims that cannot be grounded in the source. ( https://docs.anthropic.com/en/docs
/test-and-evaluate/strengthen-guardrails/reduce-hallucinations )
The correct response is therefore to return an explicit missing-data state, retrieve the external document through a tool, or route the record for enrichment. Retrying without changing the information boundary cannot solve the problem.
Current Anthropic Structured Outputs can eliminate many shape-related failures by guaranteeing JSON Schema conformance, but they still cannot create unavailable source facts. ( https://platform.claude.com/docs
/en/build-with-claude/structured-outputs ) This distinction-format failure versus evidence failure-is central to reliable extraction architecture.
Official references/topics: Retry Boundaries; Missing Context; Grounded Extraction; Structured Outputs; External Data Retrieval.


NEW QUESTION # 30
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?

  • 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. Return structured error responses with "retriable": false for business errors and a customer-friendly explanation for Claude to use.
  • D. Add a check_refund_eligibility tool that must be called before process_refund to prevent business rule violations.

Answer: C

Explanation:
The error response must explicitly communicate both control semantics and user-facing meaning. Setting
"retriable": false tells the agent that repeating the same operation cannot change the outcome. Providing a customer-friendly explanation allows Claude to respond accurately without exposing internal implementation details or inventing its own interpretation of the business rule.
Anthropic recommends returning failed tool operations with an error indicator and sufficiently informative content so Claude can decide whether to retry, request another input, or explain the limitation. Tool interfaces should provide detailed descriptions and structured parameters rather than forcing Claude to infer operational behavior from ambiguous text. ( https://platform.claude.com/docs/en/agents-and-tools/tool-use/build-a-tool- using-agent?utm_source=chatgpt.com ) Option A appropriately limits automatic retries to technical failures, but it does not solve the stated customer- response problem unless business failures also carry clear semantics. Option B relies on fragile parsing of human-readable messages. Option C adds latency and another tool dependency, and eligibility may still change or fail for reasons not covered by the preliminary check.
A complete schema should identify the error code, category, retryability, customer-safe explanation, and permitted next actions. Technical errors can similarly return "retriable": true with retry guidance and a maximum-attempt policy.
Official references/topics: Structured tool errors, retryability classification, customer-safe explanations, resilient MCP contracts.


NEW QUESTION # 31
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?

  • 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.

Answer: B

Explanation:
The task is open-ended because neither the critical modules nor the required testing sequence is known in advance. The agent should first use lightweight discovery tools to map the repository, locate existing tests, identify central modules, and determine which components have high fan-in, business significance, complex branching, or extensive external dependencies. It can then produce an initial risk-based testing plan and refine it as new dependency information appears.
Anthropic distinguishes predefined workflows from agents that dynamically control their processes and tool usage. Agents are appropriate when the required steps cannot be reliably hardcoded and must adapt to environmental evidence. During execution, they should obtain ground truth through tool results and use that feedback to determine subsequent actions. ( https://www.anthropic.com/research/building-effective-agents ) Anthropic also identifies orchestrator-worker designs as suitable for complex coding and search tasks where the necessary subtasks depend on what the investigation reveals. ( https://www.anthropic.com/research
/building-effective-agents )
Option A assigns effort using directory boundaries rather than risk. Option C exhausts context before delivering value. Option D uses alphabetical order, which has no relationship to impact or coverage priority.
Option B establishes an evidence-driven decomposition: discover, prioritize, test high-impact paths, measure results, and revise the plan as dependencies and uncovered risks emerge.
Official references/topics: Dynamic Task Decomposition; Adaptive Agent Loops; Orchestrator-Workers; Risk-Based Test Planning.


NEW QUESTION # 32
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?

  • A. 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.
  • B. 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.
  • C. You manually set the tool_choice parameter to "none" after the final expected tool call to force Claude to stop requesting tools.
  • D. You track the number of tool calls made and exit the loop once a preconfigured maximum is reached.

Answer: A


NEW QUESTION # 33
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 extracts event metadata (date, location, organizer, attendee_count) from news articles using a JSON schema with all nullable fields. During evaluation, you observe the model frequently generates plausible but incorrect values for fields not mentioned in the article-for example, outputting "500" for attendee_count when the source contains no attendance information.
What's the most effective way to reduce these false extractions?

  • A. Add prompt instructions to return null for any field where information is not directly stated in the source.
  • B. Add a post-processing step using a second LLM call to verify each extracted value exists in the source document.
  • C. Make all schema fields required (non-nullable) with strict validation rules to ensure the model only outputs verifiable data.
  • D. Upgrade to a more capable model tier with improved instruction-following to reduce hallucination tendencies.

Answer: A

Explanation:
The schema already supports the correct representation of missing evidence: null . The remaining defect is behavioral. Claude must be explicitly instructed that absence of information is a valid outcome and that values may be populated only when directly supported by the supplied article.
Anthropic's hallucination-reduction guidance recommends explicitly permitting Claude to express uncertainty, grounding outputs in the source, and retracting claims that lack supporting evidence. It also recommends restricting the model to the provided documents rather than allowing unsupported external knowledge. ( https://docs.anthropic.com/en/docs/test-and-evaluate/strengthen-guardrails/reduce-hallucinations ) Option C translates those controls directly into the extraction contract: when no source evidence exists, the model returns null .
Option A may improve baseline performance but does not remove the architectural ambiguity that encourages completion of missing fields. Option B is counterproductive because non-nullable required fields force the model to provide values even when the article contains none. Structured validation would confirm that the response is syntactically valid while accepting fabricated content. Option D adds cost, latency, and another probabilistic model decision; a second model can repeat or endorse the original hallucination.
A robust implementation should supplement the instruction with source spans or quotations for populated fields and automated checks where feasible. Nevertheless, among the options, explicit null behavior is the direct and most effective correction.
Official references/topics: Reduce Hallucinations; External-Knowledge Restriction; Nullable JSON Schema Fields; Grounded Extraction.


NEW QUESTION # 34
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 a billing dispute resolution, your agent successfully retrieves customer info via get_customer and order details via lookup_order , but when attempting to call process_refund , the tool returns a timeout error.
The agent has enough information to explain the charges and verify refund eligibility, but cannot actually process the refund due to the backend failure.
What approach best balances first-contact resolution with appropriate error handling?

  • A. Implement automatic retries with exponential backoff for process_refund , keeping the conversation open until the refund is successfully processed.
  • B. Explain the billing, confirm refund eligibility, acknowledge the system issue preventing immediate processing, and offer escalation or retry later.
  • C. Confirm the refund will be processed and close the conversation, since the system has all necessary information to complete it automatically.
  • D. Escalate immediately to a human agent since the refund action cannot be completed.

Answer: B

Explanation:
First-contact resolution does not require pretending that every backend operation succeeded. The agent can still resolve the informational portion of the interaction by explaining the charge and confirming eligibility using the successfully retrieved customer and order data. It must then distinguish that verified conclusion from the uncompleted refund transaction.
Anthropic's tool-error guidance states that Claude should receive the failure information so it can retry, request clarification, or explain the limitation. A tool timeout must therefore be surfaced honestly rather than converted into an unsupported success claim. ( https://platform.claude.com/docs/en/agents-and-tools/tool-use
/build-a-tool-using-agent?utm_source=chatgpt.com ) Anthropic also emphasizes transparent, simple agent designs and carefully constructed tool interfaces, which support explicit disclosure of tool failure and controlled escalation. ( https://www.anthropic.com/engineering/building-effective-agents ) Option A can create an unbounded or excessively long interaction; retries should be limited and conditioned on retryability. Option B falsely represents an incomplete financial operation as completed. Option D discards the useful work already performed and escalates before providing the customer with the available explanation.
Option C preserves trust, delivers the information already established, clearly states what remains incomplete, and gives the customer a practical next step through bounded retry or human escalation.
Official references/topics: Graceful tool failure, transparent customer communication, bounded retry, human escalation.


NEW QUESTION # 35
......

Updated Verified CCAR-F Q&As - Pass Guarantee: https://actualtests.latestcram.com/CCAR-F-exam-cram-questions.html