coleam00/Archon · error

Workflow run not found after fan-out recovery (id: ${id})

Error message

Workflow run not found after fan-out recovery (id: ${id})

What it means

Error "Workflow run not found after fan-out recovery (id: ${id})" thrown in coleam00/Archon.

Source

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

           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;
    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 {

View on GitHub (pinned to 0773b97458)

When it happens

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