Skip to content

Human flags, AI remediates

The escalation boundaryDashboardHTTPMCP_lt.needsTriage_lt.hintMcpEscalationStrategymcpTriage

A reviewer who cannot fix the input marks it for triage, and a tool-calling workflow repairs it and runs the original step again.

The situation

A scanned page arrives upside down. The reviewer can see the problem but cannot produce the extracted data by hand. They need the system to rotate the page and try the extraction again.

The recipe

start.ts
await start({
database: { connectionString: process.env.DATABASE_URL },
workers: [/* ... */],
escalation: { strategy: 'mcp' },
});
The reviewer's resolve
{
"resolverPayload": {
"_lt": { "needsTriage": true, "hint": "image_orientation" },
"notes": "Page 1 is upside down"
}
}

The _lt key in a resolver payload is reserved for routing hints. With the MCP strategy, needsTriage: true routes the resolution to the mcpTriage workflow instead of a plain re-run, and hint tells it which tools to reach for.

The guarantee

Triage reads every upstream step that shares the originId, calls tools (here rotate_page per page), and either re-invokes the original workflow with corrected data or raises a targeted escalation. The re-invoked step signals back through the standard channels, so a waiting parent resumes as usual. A payload without the flag takes the normal re-run path. The triage workers register when an LLM key is set. See Triage.