{"record":{"id":"a9ad362d85d9fbe8","repo":"coleam00/Archon","slug":"workflow-run-not-found-id-id","errorCode":null,"errorMessage":"Workflow run not found (id: ${id})","messagePattern":"Workflow run not found \\(id: (.+?)\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/core/src/db/workflows.ts","lineNumber":1014,"sourceCode":"    // activated by another caller. Refuse rather than double-claim the worktree.\n    // Probe the current status for an actionable error (informational only; the\n    // probe rethrows on its own failure).\n    let probeRows: readonly { status: string }[];\n    try {\n      const probe = await pool.query<{ status: string }>(\n        'SELECT status FROM remote_agent_workflow_runs WHERE id = $1',\n        [id]\n      );\n      probeRows = probe.rows;\n    } catch (error) {\n      const err = error as Error;\n      getLog().error({ err, workflowRunId: id }, 'db.workflow_run_resume_probe_failed');\n      throw new Error(`Failed to resume workflow run: ${err.message}`, { cause: err });\n    }\n    const currentStatus = probeRows[0]?.status;\n    if (currentStatus === undefined) {\n      getLog().warn({ workflowRunId: id }, 'db.workflow_run_resume_not_found');\n      throw new Error(`Workflow run not found (id: ${id})`);\n    }\n    getLog().info({ workflowRunId: id, currentStatus }, 'db.workflow_run_resume_not_resumable');\n    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];","sourceCodeStart":996,"sourceCodeEnd":1032,"githubUrl":"https://github.com/coleam00/Archon/blob/0773b9745896ef0612e709c80845a0f7db315b19/packages/core/src/db/workflows.ts#L996-L1032","documentation":"Error \"Workflow run not found (id: ${id})\" thrown in coleam00/Archon.","triggerScenarios":"Thrown at packages/core/src/db/workflows.ts:1014 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"}