coleam00/Archon · error
Failed to recover cancelled fan-out run: ${err.message}
Error message
Failed to recover cancelled fan-out run: ${err.message} What it means
Error "Failed to recover cancelled fan-out run: ${err.message}" thrown in coleam00/Archon.
Source
Thrown at packages/core/src/db/workflows.ts:1089
`DELETE FROM remote_agent_workflow_events
WHERE workflow_run_id = $1
AND event_type = 'workflow_cancelled'
AND ${eventReason} IN ($2, $3, $4)`,
[id, ...FAN_OUT_CANCEL_REASONS]
);
const recovered = await query<WorkflowRun>(
'SELECT * FROM remote_agent_workflow_runs WHERE id = $1',
[id]
);
const row = recovered.rows[0];
if (!row) throw new Error(`Workflow run not found after fan-out recovery (id: ${id})`);
return normalizeWorkflowRun(row);
});
} catch (error) {
if (error instanceof Error && error.message.startsWith('Workflow run ')) throw error;
const err = error as Error;
getLog().error({ err, workflowRunId: id }, 'db.workflow_run_fan_out_recover_failed');
throw new Error(`Failed to recover cancelled fan-out run: ${err.message}`);
}
}
/**
* Find the most recent workflow run for a worker platform conversation ID.
* Joins with conversations table to resolve platform_conversation_id → DB id.
*/
export async function getWorkflowRunByWorkerPlatformId(
platformConversationId: string
): Promise<WorkflowRun | null> {
try {
const result = await pool.query<WorkflowRun>(
`SELECT r.* FROM remote_agent_workflow_runs r
JOIN remote_agent_conversations c ON r.conversation_id = c.id
WHERE c.platform_conversation_id = $1
ORDER BY r.started_at DESC LIMIT 1`,
[platformConversationId]
);View on GitHub (pinned to 0773b97458)
When it happens
Trigger: Thrown at packages/core/src/db/workflows.ts:1089 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of coleam00/Archon@0773b97458 (2026-09-01).
Data as JSON: /api/errors/c79a407eadc942f6.
Report an issue: GitHub.