{"record":{"id":"cd691e4317376031","repo":"coleam00/Archon","slug":"workflow-run-vanished-after-update-id-id","errorCode":null,"errorMessage":"Workflow run vanished after update (id: ${id})","messagePattern":"Workflow run vanished after update \\(id: (.+?)\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/core/src/db/workflows.ts","lineNumber":1035,"sourceCode":"    throw new WorkflowNotResumableError(id, currentStatus);\n  }\n\n  let selectResult: Awaited<ReturnType<typeof pool.query<WorkflowRun>>>;\n  try {\n    selectResult = await pool.query<WorkflowRun>(\n      'SELECT * FROM remote_agent_workflow_runs WHERE id = $1',\n      [id]\n    );\n  } catch (error) {\n    const err = error as Error;\n    getLog().error({ err, workflowRunId: id }, 'db.workflow_run_resume_select_failed');\n    throw new Error(`Failed to read workflow run after update: ${err.message}`);\n  }\n\n  const row = selectResult.rows[0];\n  if (!row) {\n    getLog().error({ workflowRunId: id }, 'db.workflow_run_resume_vanished');\n    throw new Error(`Workflow run vanished after update (id: ${id})`);\n  }\n  return normalizeWorkflowRun(row);\n}\n\nexport async function recoverCancelledFanOutRun(id: string): Promise<WorkflowRun> {\n  const dialect = getDialect();\n  const cancelledReason =\n    getDatabaseType() === 'postgresql'\n      ? \"metadata->>'cancelled_reason'\"\n      : \"json_extract(metadata, '$.cancelled_reason')\";\n  const metadataWithoutCancelledReason =\n    getDatabaseType() === 'postgresql'\n      ? \"metadata - 'cancelled_reason'\"\n      : \"json_remove(metadata, '$.cancelled_reason')\";\n  const eventReason =\n    getDatabaseType() === 'postgresql' ? \"data->>'reason'\" : \"json_extract(data, '$.reason')\";\n\n  try {","sourceCodeStart":1017,"sourceCodeEnd":1053,"githubUrl":"https://github.com/coleam00/Archon/blob/0773b9745896ef0612e709c80845a0f7db315b19/packages/core/src/db/workflows.ts#L1017-L1053","documentation":"Error \"Workflow run vanished after update (id: ${id})\" thrown in coleam00/Archon.","triggerScenarios":"Thrown at packages/core/src/db/workflows.ts:1035 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"}