Cancel is home
Cancelling a wait sends the item back to a known home queue. An operator's cancel is a safe reset, never a lost item.
The situation
A part is parked at a work cell, but the cell is going down for maintenance. An operator needs one gesture that pulls the part out and puts it somewhere a person will pick it up.
The recipe
const run = await conditional<RunResultV1>(`run-${serialNumber}-${step}`, { role: 'cell-a', subtype: 'running', metadata: { serialNumber },});
if (run === null) { const recovered = await conditional<{ nextCell: string }>(`home-${serialNumber}-${step}`, { role: 'service', description: 'Returned from cell-a', metadata: { serialNumber }, }); if (recovered) return routeTo(recovered.nextCell);}curl -X POST https://lt.acme.dev/api/escalations/$ID/cancel -H "Authorization: Bearer $TOKEN"Cancel from the dashboard, the cancel_escalation MCP tool, or a scan rule that asks for confirmation first. The workflow sees null and parks the part on its home queue.
The guarantee
Cancel is terminal: the row is cancelled and a second cancel or a late resolve answers 409. The waiting conditional receives null, which the workflow handles as “go home”. Items held by a cancelled container stay on the row. See Conditional.
Related patterns
The escalation boundary
Answer, timeout or cancel
Every wait ends in one of three typed values: the answer, false on timeout, or null on cancel. Each branch is explicit in code.
The physical world
Facts above, choices below
One lifelong code serves many intents: the station states what is true about the row and offers the actions that fit.
Analytics
Park every state
Each state an item passes through is one escalation row. The queue becomes a complete time series of the process with no extra instrumentation.
The physical world
Manager override
An exception action shows to everyone and runs only for a badge that holds the manager role; anyone else is refused and keeps their badge.
