Skip to content

Cancel is home

Resolving from anywhereDashboardHTTPMCPScanconditionalcancelcancel_escalation

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

workflows/part.ts
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);
}
The operator's gesture
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.