CCAR-F practice question 1 of 10

You are building a customer support resolution agent using the Claude Agent SDK. The agent handles high-ambiguity requests like returns, billing…

Full set: 191 questions
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?
Answer options
A: Implement automatic retry logic at the tool layer for technical errors only, passing business errors to Claude without retries.
B: Add few-shot examples showing how to distinguish retriable from non-retriable errors by parsing error message text.
C: Add a check_refund_eligibility tool that must be called before process_refund to prevent business rule violations.
D: Return structured error responses with "retriable": false for business errors and a customer-friendly explanation for Claude to use. Correct answer
Correct Answer:
D. Return structured error responses with "retriable": false for business errors and a customer-friendly explanation for Claude to use.
Explanation

This approach is the most effective because it provides Claude with unambiguous, structured information. The "retriable": false flag explicitly instructs the model not to retry, directly solving the problem of wasted turns on permanent business errors. Including a customer-friendly explanation in the structured response equips Claude to deliver a clear, helpful, and pre-approved message to the user, directly addressing the goal of improving response quality. This method is significantly more robust and reliable than parsing error text and more efficient than adding extra tool calls.

Why Incorrect

A. This only partially solves the problem. It doesn't guide Claude on how to handle the finality of business errors or improve the customer-facing message.
B. Relying on parsing error message text is a brittle and unreliable method. Error message strings can change, which would break the agent's logic.
C. This adds an extra tool call and turn, increasing latency and complexity without addressing how to handle errors when they do occur.

References

1. Anthropic Claude Documentation, "Build with Claude > Tool use > Best practices for tool design": This section emphasizes the importance of returning structured data. It states, "Instead of returning a single string, have your tools return structured data (like JSON) whenever possible. This makes it easier for Claude to parse and use the information." Option D directly implements this by returning a structured JSON object.

2. Anthropic Claude Documentation, "Build with Claude > Tool use > Error handling": This section details how to manage tool failures. The best practice is to provide clear, informative error messages that guide Claude's next action. A structured response with a retriable flag and a user-facing message is the most effective way to implement this guidance, clearly distinguishing between transient and permanent failures.

3. Anthropic Claude Documentation, "Build with Claude > Prompting > Prompting for tool use": The documentation on prompting for tool use implicitly relies on the model receiving clear, parseable outputs from tools to make decisions. Structured data, as proposed in option D, is the most reliable format for the model to reason over, far superior to parsing natural language error strings as suggested in option B.

Scroll to Top