Claude Certified Architect - FoundationsCCAR-F Learning Guide
Domain 1 · Lesson 1.4 · 7 min read

Workflow Enforcement and Human Handoff

Exam taskImplement multi-step workflows with enforcement and handoff patterns

When a step must happen before another, enforce it in code rather than asking nicely in the prompt; split multi-issue requests into items; and hand off to humans with a structured summary they can act on.

What you need to know

Prompt guidance versus programmatic enforcement

There are two ways to make an agent do steps in order:

Prompt-based guidanceProgrammatic enforcement
How"Always verify the customer before looking up orders" in the system promptCode that blocks the downstream tool until the prerequisite has succeeded
ReliabilityHigh, but not 100%: a persuasive message or an unusual case can skip itDeterministic: the blocked call cannot run
Good forPreferences, tone, ordering that is nice to haveRules with legal, financial or security consequences

When a requirement is deterministic, such as "identity must be verified before any financial operation", a prompt alone has a non-zero failure rate. In production, a 1% failure rate across 50,000 contacts is 500 refunds to unverified callers. The exam expects you to recognise this and choose enforcement in code.

Programmatic prerequisites

A prerequisite gate tracks what has happened in the session and refuses calls that come too early.

verified = {}   # session_id -> customer_id, set when get_customer verifies

def gate(session_id, tool_name):
    if tool_name in ("lookup_order", "process_refund") and session_id not in verified:
        return "Blocked: verify the customer with get_customer first."
    return None   # allowed

In the Agent SDK this check usually lives in a PreToolUse hook (lesson 1.5), which denies the call and tells Claude why, so Claude can go back and verify.

Multi-concern requests

Customers often raise several problems in one message: a damaged item, a wrong address and missing loyalty points. Handling only the first one and asking "anything else?" damages first-contact resolution. The stronger pattern:

  1. Decompose the message into distinct items.
  2. Investigate each against the shared customer context (one verification, one customer record), in parallel where the items are independent.
  3. Synthesise one reply that resolves or explains each item.

Structured handoff to humans

When the agent escalates mid-process, the human agent usually cannot see the transcript. A handoff that says "customer has a billing issue, please help" forces the human to start again and the customer to repeat themselves. A structured handoff carries what the human needs to act:

FieldExample
Customer ID and verification statusC-118204, verified by email and order number
The issue, in one lineCharged twice for order 55107
Root cause found so farPayment retried after a gateway timeout
Amounts and references$219.90, orders 55107 and 55107-R
Actions already takenRefund of the duplicate requested, rejected: over limit
Recommended next actionApprove the $219.90 refund of the duplicate charge

In the exam

Scenario 1 (customer support) carries most of these. Typical stems: a measured rate of skipped verification, refunds that bypass a rule, a multi-part message handled partially, or human agents complaining that escalations are useless. Choose code-level enforcement for hard rules, decomposition for multi-concern messages, and a structured summary for handoffs.

Check your understanding

Question 1

In 2% of chats the agent looks up orders before verifying the customer, despite a clear instruction. What is the best fix?

Show answer

Answer: A. A prompt can reduce the skip rate but cannot guarantee it. A programmatic prerequisite makes the out-of-order call impossible.

Question 2

A customer's message raises a damaged item, a wrong address and missing points. What should the agent do?

Show answer

Answer: C. Decomposing the request and resolving each item against shared context protects first-contact resolution. Escalation is for items that meet a trigger, not for messages with more than one item.

Question 3

Human agents say escalations from the bot are useless. What should the handoff contain?

Show answer

Answer: B. The human cannot see the transcript, so the handoff must stand alone: who the customer is, what was found, the numbers involved, what was tried and what to do next.

Apply it: Gate Cedar Ridge's refund workflow

Exercise · about 20 minCase: Cedar Ridge Outfitters

Cedar Ridge's finance controller wants proof that no refund can reach an unverified customer, and the support lead wants handoffs her team can act on. Design both.

  1. List the prerequisites. For each of lookup_order and process_refund, state what must already have happened in the session.
  2. Say where each check runs and what Claude is told when a call is blocked.
    Why: a blocked call with no reason leaves Claude guessing.
  3. Walk one multi-issue message through the workflow. Use: "My tent arrived torn (order 55107), and I never got points for order 54980."
  4. Write the handoff template for an escalated refund over the $500 limit.
Check your work
Show model answer

1. Prerequisites

ToolMust already be true
lookup_orderget_customer returned one verified customer ID in this session
process_refundCustomer verified; the order was looked up in this session and belongs to that customer; amount at most $500

2. Where and what. All checks run in a PreToolUse hook on the support server's tools, using session state set by earlier tool results. A blocked call is denied with a reason Claude can act on, such as "Blocked: verify the customer with get_customer first" or "Blocked: refunds over $500 need a human; use escalate_to_human with a handoff summary."

3. Multi-issue walk-through. Verify the customer once. Split into item A (torn tent, order 55107) and item B (missing points, order 54980). Look up both orders. A: within 45 days, refund or replacement offered. B: points were not credited, so credit them or explain why not. One reply covers both items, each with its outcome.

4. Handoff template

FieldContent
CustomerID, name, how verified
IssueOne line
Root causeWhat the agent found
Amounts and ordersRefund requested, order numbers
Already doneTools run and their outcomes
Why escalatedOver the $500 limit
Recommended actionApprove or reject, with reason

Sources