{"record":{"id":"a0c05ffd135b79f1","repo":"coleam00/Archon","slug":"failed-to-create-workflow-run-insert-returned-no","errorCode":null,"errorMessage":"Failed to create workflow run: INSERT returned no rows (workflow: ${data.workflow_name})","messagePattern":"Failed to create workflow run: INSERT returned no rows \\(workflow: (.+?)\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/core/src/db/workflows.ts","lineNumber":432,"sourceCode":"       VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11)\n       RETURNING *`,\n      [\n        data.workflow_name,\n        data.conversation_id,\n        data.codebase_id ?? null,\n        data.user_message,\n        metadataJson,\n        data.working_path ?? null,\n        data.parent_conversation_id ?? null,\n        data.user_id ?? null,\n        data.parent_run_id ?? null,\n        data.adopted_from_run_id ?? null,\n        ...(data.id === undefined ? [] : [data.id]),\n      ]\n    );\n    const row = result.rows[0];\n    if (!row) {\n      throw new Error(\n        `Failed to create workflow run: INSERT returned no rows (workflow: ${data.workflow_name})`\n      );\n    }\n    return normalizeWorkflowRun(row);\n  } catch (error) {\n    const err = error as Error;\n    getLog().error({ err }, 'db.workflow_run_create_failed');\n    throw new Error(`Failed to create workflow run: ${err.message}`);\n  }\n}\n\nexport async function getWorkflowRun(id: string): Promise<WorkflowRun | null> {\n  try {\n    const result = await pool.query<WorkflowRun>(\n      'SELECT * FROM remote_agent_workflow_runs WHERE id = $1',\n      [id]\n    );\n    const row = result.rows[0];","sourceCodeStart":414,"sourceCodeEnd":450,"githubUrl":"https://github.com/coleam00/Archon/blob/0773b9745896ef0612e709c80845a0f7db315b19/packages/core/src/db/workflows.ts#L414-L450","documentation":"Error \"Failed to create workflow run: INSERT returned no rows (workflow: ${data.workflow_name})\" thrown in coleam00/Archon.","triggerScenarios":"Thrown at packages/core/src/db/workflows.ts:432 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0773b9745896ef0612e709c80845a0f7db315b19","analyzedAt":"2026-09-01T02:28:07.064Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}