cleandataengineering.aiAgent Harness, drawn simply
You are here: Real flows › 9 · Payout above the limit, refused

Agent Harness Tutorial · Real flows

Flow 9: Payout above the limit, refused

Route: Agentic + wait. Turn 1: 1 model call · $0.00021 · Turn 2: 187 ms, no model.

Open: Entra IDEntraIDOpen: PostgreSQLPostgresstateOpen: DBOSDBOSwaitsOpen: APIM → modelAPIM→ modelOpen: Claims (MCP)ClaimsMCPTHE BOXES IT PASSEDWHAT HAPPENEDBEFORE THE MESSAGEOpen: Sign-in with Microsoft EntraSign-in with Microsoft Entrazoom in ›1Rohan signs in with MicrosoftEntra ID (code flow + PKCE); thetoken stays in the pageOpen: Page opens: load the conversationPage opens: load the conversationzoom in ›2GET /opening: the newestcheckpoint is resumed if under24 h old, else a newconversationTURN 1Rohan: "Please release the payment for claim CLM-010004."Open: Front doorFront doorzoom in ›3body ≤ 8 KiB · token verified →PH-1001 · kill switch onOpen: Delivery ledgerDelivery ledgerzoom in ›4new row PH-1001:<delivery id>,in_flight, expires in 600 sOpen: Anything waiting?Anything waiting?zoom in ›5nothing pendingOpen: RouterRouterzoom in ›6payout_request: AgenticOpen: Consent: what his words allowConsent: what his words allowzoom in ›7request_payout:CLM-010004TRIP 1Open: Context assemblyContext assemblyzoom in ›8Open: Pre-model checkPre-model checkzoom in ›9no_known_injection: passOpen: Model callModel callzoom in ›101,366 ms · 657 in / 52 out ·APIM: allow-list, rate limit,Content Safety passOpen: Read the answerRead the answerzoom in ›11wants a toolOpen: Pre-tool checkPre-tool checkzoom in ›12consent · passOpen: Tool callTool callzoom in ›13request_payout → DBOS approvalapr_abd6396ec6acOpen: Post-tool checkPost-tool checkzoom in ›14fenced ·no_instructions_in_result: passOpen: DBOS approvalDBOS approvalzoom in ›15assess: get_claim 18 ms · abovethe limit → WAITINGOpen: After-loop rulesAfter-loop ruleszoom in ›16no Tier-2 rule fires · promisegate: passOpen: Before-reply checkBefore-reply checkzoom in ›17no_promise_of_cover,no_pii_echo, money_in_rupees:passOpen: Save and settleSave and settlezoom in ›18pending_approval_id saved · HTTP202 · 1,874 msReply: "I have sent this payout to a claims handler to authorise ... Nothing has been paidyet."ASHA AT THE DESKOpen: Asha at the desk (/ops)Asha at the desk (/ops)zoom in ›19POST …/apr_abd6396ec6ac/decide{granted: false} · 358 msOpen: DBOS approvalDBOS approvalzoom in ›20REFUSED · nothing paidTURN 2Rohan: "Any update on my payout?"Open: Front doorFront doorzoom in ›21body ≤ 8 KiB · token verified →PH-1001 · kill switch onOpen: Delivery ledgerDelivery ledgerzoom in ›22new row PH-1001:<delivery id>,in_flight, expires in 600 sOpen: Anything waiting?Anything waiting?zoom in ›23approval resumed: refused · 0 ms· no router, no modelOpen: Save and settleSave and settlezoom in ›24pending cleared · 187 msReply: "A claims handler reviewed this payout and could not authorise it."
Left: the boxes this message really passed, in order; each opens its design page. Middle: the outside systems each box called, as dots on five lanes (Entra ID, PostgreSQL, DBOS, APIM in front of the model, the claims system over MCP); click a lane head to open it. Right: what happened. Grey boxes are checks, the dark box is the model, a crossed box is where something was blocked.
What it teachesAbove the limit a person decides, and the next turn is answered from the approval's state, without a model.

Want every detail? The long version is in the Series: this flow with real spans and payloads.