Question 51
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 lessonA 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?