coleam00/Archon · error

Workflow run is not an engine-cancelled fan-out child (id: $

Error message

Workflow run is not an engine-cancelled fan-out child (id: ${id})

What it means

Error "Workflow run is not an engine-cancelled fan-out child (id: ${id})" thrown in coleam00/Archon.

Source

Thrown at packages/core/src/db/workflows.ts:1068

  const eventReason =
    getDatabaseType() === 'postgresql' ? "data->>'reason'" : "json_extract(data, '$.reason')";

  try {
    return await getDatabase().withTransaction(async query => {
      const result = await query(
        `UPDATE remote_agent_workflow_runs
         SET status = 'running',
             completed_at = NULL,
             started_at = ${dialect.now()},
             last_activity_at = ${dialect.now()},
             metadata = ${metadataWithoutCancelledReason}
         WHERE id = $1
           AND status = 'cancelled'
           AND ${cancelledReason} IN ($2, $3, $4)`,
        [id, ...FAN_OUT_CANCEL_REASONS]
      );
      if ((result.rowCount ?? 0) === 0) {
        throw new Error(`Workflow run is not an engine-cancelled fan-out child (id: ${id})`);
      }
      await query(
        `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;

View on GitHub (pinned to 0773b97458)

When it happens

Trigger: Thrown at packages/core/src/db/workflows.ts:1068 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/bdcab5992656849a. Report an issue: GitHub.