Primary domains: D1 Agentic Architecture & Orchestration (27%) · D2 Tool Design & MCP Integration (18%) · D5 Context Management & Reliability (15%) — spans 60%
Identical domain profile to s3.md. Whoever owns one should own the other.
Brief
A customer-support resolution agent on the Claude Agent SDK, handling high-ambiguity requests — returns, billing disputes, account issues. It reaches backend systems through custom MCP tools: get_customer, lookup_order, process_refund, escalate_to_human. Target is 80%+ first-contact resolution while knowing when to escalate.
Task statements in play
| ID | Statement |
|---|---|
| 1.1 | Design and implement agentic loops for autonomous task execution |
| 1.4 | Implement multi-step workflows with enforcement and handoff patterns |
| 1.5 | Apply Agent SDK hooks for tool call interception and data normalization |
| 2.1 | Design effective tool interfaces with clear descriptions and boundaries |
| 2.2 | Implement structured error responses for MCP tools |
| 5.2 | Design effective escalation and ambiguity resolution patterns |
| 5.3 | Implement error propagation strategies across multi-agent systems |
| 5.5 | Design human review workflows and confidence calibration |
The decisions it tests
Enforcement versus instruction — this exam's favourite distinction. When compliance must be guaranteed, prompt instructions are the wrong tool: they carry a non-zero failure rate. Use programmatic enforcement — hooks and prerequisite gates. The guide's own example: block process_refund until get_customer has returned a verified customer ID. A hook that intercepts the outgoing call and refuses is deterministic; "always verify identity first" in the system prompt is a probability.
Same shape for policy limits: a refund over a threshold gets blocked by an interception hook and redirected to human escalation, not discouraged in prose.
Structured handoff to someone with no transcript. When escalating, the human agent lacks access to the conversation transcript. The guide names four fields in the structured handoff summary — customer ID, root cause, refund amount, recommended action — a structured payload, not "the customer is upset about an order." All four; an answer that drops one is incomplete.
MCP error taxonomy. The isError flag communicates tool failures back to the agent, and the guide draws a distinction between four kinds: transient errors (timeouts, service unavailability), validation errors (invalid input), business errors (policy violations), and permission errors. Uniform responses (a generic "Operation failed") prevent the agent from making appropriate recovery decisions. The structured error metadata the guide asks for is errorCategory (transient/validation/permission), an isRetryable boolean, and human-readable descriptions — plus retriable: false flags and customer-friendly explanations for business rule violations.
On what to do with each kind, the guide states only two dispositions: retry transient errors, and explain business errors to the user. Retrying a business error forever is a classic wrong answer.
> Ours, not the guide's. The guide does not prescribe a disposition for validation or permission > errors. This lab treats validation as fix-the-arguments-and-retry-once and permission as escalate, > because that is what we would ship — but neither arrow is exam content, and neither should be > memorised as though the guide said it. What the guide does say is that retryable and non-retryable > must be distinguishable from the returned metadata so retries are not wasted, and that a subagent > should recover locally from transient failures and propagate only what it cannot resolve, along with > partial results and what was attempted.
Normalizing heterogeneous tool output. Different backends return Unix epochs, ISO 8601 strings, and numeric status codes. A PostToolUse hook normalizes them before the model reasons over them, rather than asking the model to cope.
Reference build
- Four stub MCP tools matching the published names, each returning structured errors across all four categories
- A prerequisite gate:
process_refundrefuses until a verified customer ID exists in state - An interception hook blocking refunds above a threshold and redirecting to escalation
- A
PostToolUsehook normalizing three deliberately mismatched timestamp formats - A structured escalation payload, with a test asserting every required field is present
Traps
- Hope over enforcement — a system-prompt instruction where a gate is required. If the question says "must", "guaranteed", or "always", the answer is programmatic.
- Detect over prevent — logging refunds for later audit, or adding a confirmation step, instead of removing or gating the capability. Least privilege means removing what the role does not need.
- Scale over design — a more capable model to follow instructions "more reliably".
- Escalating with a conversation dump instead of a structured summary.
- Treating every tool failure as retryable.