coleam00/Archon · error

Failed to create workflow run: INSERT returned no rows (work

Error message

Failed to create workflow run: INSERT returned no rows (workflow: ${data.workflow_name})

What it means

Error "Failed to create workflow run: INSERT returned no rows (workflow: ${data.workflow_name})" thrown in coleam00/Archon.

Source

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

       VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11)
       RETURNING *`,
      [
        data.workflow_name,
        data.conversation_id,
        data.codebase_id ?? null,
        data.user_message,
        metadataJson,
        data.working_path ?? null,
        data.parent_conversation_id ?? null,
        data.user_id ?? null,
        data.parent_run_id ?? null,
        data.adopted_from_run_id ?? null,
        ...(data.id === undefined ? [] : [data.id]),
      ]
    );
    const row = result.rows[0];
    if (!row) {
      throw new Error(
        `Failed to create workflow run: INSERT returned no rows (workflow: ${data.workflow_name})`
      );
    }
    return normalizeWorkflowRun(row);
  } catch (error) {
    const err = error as Error;
    getLog().error({ err }, 'db.workflow_run_create_failed');
    throw new Error(`Failed to create workflow run: ${err.message}`);
  }
}

export async function getWorkflowRun(id: string): Promise<WorkflowRun | null> {
  try {
    const result = await pool.query<WorkflowRun>(
      'SELECT * FROM remote_agent_workflow_runs WHERE id = $1',
      [id]
    );
    const row = result.rows[0];

View on GitHub (pinned to 0773b97458)

When it happens

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