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 questionsThis 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.
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.
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.
Keep practicing
Take the free CCAR-F practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other CCAR-F practice questions
- Question 2Your team is building an MCP integration where Claude needs to fetch real-time inventory …
- Question 3You are building developer productivity tools using the Claude Agent SDK. The agent helps…
- Question 4You are integrating Claude Code into your Continuous Integration/Continuous Deployment (C…
- Question 6You are building a structured data extraction system using Claude. The system extracts in…
- Question 7You are building a structured data extraction system using Claude. The system extracts in…
- Question 9True or False: When designing a multi-step agentic workflow, it is a best practice to exp…
