Deployed Lab

Module 7 · Scenario labs · Chapter 26 · Free

Scenario lab 1: Customer Support Resolution Agent

16 min1 clickable picture3 cases with decisions1 predict, 2 quick quizzes, final quiz5-min video review
In 30 seconds

The picture: a good shop clerk whose manager keeps the till key for big refunds.

Exam objective: Scenario 1, Customer Support Resolution Agent

One of the six official scenarios. The exam draws 4 of the 6 at random. This one mixes domains, with 1, 2 and 5 in the lead:

The cold open Harbor & Pine Outfitters is a made-up gear shop. Nadia Okafor, head of support, sets Kavish a target: 80 percent first-contact resolution. This lab is that fix, case by case. New here? Each case names the chapter that teaches its skill.
The plan for this chapter
  1. The full Pine request path, in one picture.
  2. Case 1: a $620 refund, and the gate that stops it.
  3. Case 2: a 40-field order lookup, and what reaches the summary.
  4. Case 3: an ambiguous warranty claim, escalated properly.
  5. Hands-on lab: build the gate, then run all three cases.

Next: the picture every case uses.

Step 1: The full Pine request path

Why this step: all three cases travel this one path. Learn it once; each case is a turn on it.

Pine is the clerk. The loop from chapter 3 is the counter work: send, read stop_reason, run tools, append, repeat. The hook gate is the manager's key: it checks money moves before they happen.

Where the picture breaks down:

The Pine request path A customer message enters the Pine loop. Pine calls MCP tools; a hook gate checks refunds above $500 and routes them to a human with a case summary. Customerwrites to Pine Pine loopstop_reason drives MCP toolslookup and refund Hook gateover $500? stop Human agentgets a summary Resolvedfirst contact results return refund calls checked first
  1. A customer writes in. The message, system prompt and four tool definitions go to Claude.
  2. Claude picks the next step, usually get_customer, then lookup_order. Your code runs the tools.
  3. Results join the history. Case 2 shows why you trim first: a raw order record is about 40 fields, only about 5 matter.
  4. Before any process_refund call runs, a PreToolUse hook checks the amount. Above $500, blocked. See chapter 6.
  5. The human gets a short case summary, not the raw chat: who, what, verified facts, decision needed.
  6. No second contact needed means Nadia counts it toward the 80 percent target.
CustomerPineToolsThe gateHuman

Worked example: what 80 percent actually means.

1. Volume: about 14,000 support contacts a month.

2. Target: 14,000 × 0.80 = 11,200 resolved on the first contact.

3. That leaves 2,800 that may need a human or a second touch.

4. At 64 percent, Pine resolved 14,000 × 0.64 = 8,960.

5. Gap: 11,200 minus 8,960 = 2,240 more first-contact wins a month.

So the target is "finish 2,240 more cases properly". A case finished by breaking policy does not count, which is why the Case 1 gate protects the target.

Next: Case 1, the refund that must not go through.

Step 2: Case 1, the $620 refund

The setup. A tent order totals $620. The tent arrived damaged, the photos are clear, and policy covers a full refund. One problem: $620 is above the $500 automatic limit.

The skills. The loop comes from chapter 3. Clear tool descriptions, so process_refund comes only after verification, from chapter 9. New to tools? Start with the AI course chapter on MCP.

The run, done right:

  1. get_customer verifies who is asking. No refund talk before identity checks out.
  2. lookup_order confirms the order, the $620 total and the delivery.
  3. Claude calls process_refund for $620. The PreToolUse hook blocks it, with a structured reason.
  4. Pine tells the customer: "Approved in principle. A person signs off over $500, today." Then it calls escalate_to_human with the verified facts.
  5. The human approves in one click. The customer never repeats the story.

Quick check.

Why the tempting wrong move fails. The tempting move is a stronger prompt: "NEVER refund over $500, this is critical." Prompts guide judgment; they do not guarantee it. On a long chat, the model can still slip, as in the cold open. Imran Qureshi, the security reviewer: a money rule needs a check that runs every time. The hook is that check.

What good looks like: one honest sentence to the customer, verified facts to the human, refund landed the same day.

Next: Case 2, where the tool answers too well.

Step 3: Case 2, the 40-field order lookup

The setup. "Has my jacket shipped, and can I still return it?" lookup_order returns about 40 fields: warehouse codes, tax lines, gift flags, staff notes, and the 5 facts that matter.

The skills. Tool design from chapter 9: return what the task needs. Context discipline from chapter 22: every field kept is re-sent each turn.

Do this: predict first.

Raw records pile up, get re-sent on every turn, and near-duplicate fields invite mix-ups. Trim at the tool boundary; do not hope the model ignores the noise.

What good looks like. Summary and history carry only the fields a return decision needs:

{
  "order_id": "48213",
  "item": "Trail jacket",
  "total": 129.00,
  "delivered": "2026-11-20",
  "return_window_days": 60
}

Five fields, each tied to a question someone must answer: which order, what item, how much, when it arrived, whether a return is still allowed. The other 35 stay one call away.

Why the tempting wrong move fails. "Keep everything, just in case" backfires twice: cost, because the record rides along on every turn, and accuracy, because 5 facts buried among 40 get misread under time pressure. Nadia's team reads summaries, not database dumps.

Next: Case 3, the claim nobody can settle from the text.

Step 4: Case 3, the storm-damage warranty claim

The setup. A customer says a storm tore their tent on its first trip and wants a free replacement. The photos show a torn seam. The warranty covers defects, not storm damage, and a torn seam could be either. The order is verified. The facts are not.

The skill. Chapter 23 (escalation and error propagation): escalate when the decision turns on facts the agent cannot establish, and pass the uncertainty up honestly.

What good looks like. Pine does three things:

  1. It gathers everything checkable first: customer, order, purchase date, warranty window.
  2. It does not rule on the claim. A specialist reviews the photos and decides by a stated time.
  3. It escalates with a handoff naming the open question, not just the topic:
Case summary (illustrative)
Customer: verified, C-1042. Order 51990, tent, bought 2026-09-14.
Verified: order, delivery, warranty in date. Policy text checked.
Open question: torn seam, defect or storm damage? Photos attached.
Needed: warranty decision, replace or decline, by tomorrow noon.

Quick check.

Why the tempting wrong move fails. Decide anyway, and both rulings are guesses: approving may give away a tent against policy and set a precedent; declining may refuse a valid defect claim. Escalation is the correct path, and it still counts for Nadia if the customer was told what happens next.

Next: build the gate, then run all three cases.

Step 5: Hands-on lab

Why this exercise: the exam tests these judgments in prose. Making them once, in code and in play, turns prose into reflex.

Lab: Configure Pine once, then watch the chapter's three cases run against your choices. This lab runs in your browser and needs JavaScript enabled.

Next: a field note and the mix-ups.

Field note, November 2026

Support teams piloting agents tend to learn the same lessons in the same order: the demo works, then a policy edge case breaks trust, then guardrails move from prompts into code. Common practice, not a measured statistic. Hooks for limits and summaries for handoffs are the usual shape of the fix.

The Deployed Lab jobs page (snapshot 15 Nov 2026) lists 367 open FDE roles, median posted base about $243K, base pay only.

Mix-ups to avoid

Next: the 5-minute review and quiz.

Review this chapter in 5 minutes

Watch the whole chapter recapped: the $500 hook gate, trimming 40 fields to 5, and escalating the claim nobody can settle.

Decision rule: if an option enforces a hard limit with words, keeps data nobody needs, or decides a fact the agent cannot know, it is wrong.

Independent exam preparation. Not affiliated with or endorsed by Anthropic.

Chapter quiz

Five questions. Score 70% or more to mark this chapter complete.

Review

Glossary

First-contact resolution
Contacts finished with no second contact needed. Example: 80 percent of 14,000 is 11,200.
Hook gate
A code check, such as a PreToolUse hook, that can block a tool call. Example: refunds above $500 stop here.
Case summary
The short structured note travelling with a case: who, what, verified facts, decision needed.
Handoff
Passing a case to a human with everything needed to act. Example: the warranty claim, photos attached.
Escalation
Routing a case up because a rule or an unknown fact needs a human. Example: the $620 refund.
Tool result trimming
Cutting a tool's output to the fields the task needs. Example: 5 of 40 order fields.
Verified fact
A fact a tool confirmed, not one the customer merely stated. Example: the total from lookup_order.
Open question
The one undecided point a handoff names. Example: defect or storm damage?
Policy limit
A business rule with a hard edge. Example: automatic refunds up to $500.

Next: "Scenario lab 2: Code Generation with Claude Code".