Question 49
An Agent SDK support agent handles returns, billing disputes and account issues through MCP tools like get_customer, lookup_order, process_refund and escalate_to_human. It aims to resolve most cases on first contact — and to know exactly when to hand off to a human.
Read the full scenario lessonAnthropic’s tool use documentation states: “Write instructive error messages. Instead of generic errors like ‘failed’, include what went wrong and what Claude should try next.” A billing dispute agent uses lookup_order, which catches all exceptions and returns a tool_result with is_error: true and the message “Tool execution failed”. Monitoring shows two failure modes: the agent retries the identical call until hitting the turn limit, or it immediately calls escalate_to_human without trying alternative tools. Which change follows the documented recommendation and gives Claude the information it needs to select the correct recovery action for each error type?