{"record":{"id":"3e44a81e87a05f4e","repo":"coleam00/Archon","slug":"err-message","errorCode":null,"errorMessage":"${err.message}","messagePattern":"\\$\\{err\\.message\\}","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/core/src/handlers/command-handler.ts","lineNumber":404,"sourceCode":" * \"failed\" about a gate that IS resolved would send the user to re-approve a run\n * that refuses a second decision.\n */\nasync function withRunContinuation(\n  runId: string,\n  workflowCwd: string,\n  headline: string,\n  action: 'approve' | 'reject' | 'respond'\n): Promise<CommandResult> {\n  let continuation: Awaited<ReturnType<typeof resolveRunContinuation>>;\n  try {\n    continuation = await resolveRunContinuation(runId, workflowCwd);\n  } catch (error) {\n    const err = error as Error;\n    getLog().warn(\n      { err, errorType: err.constructor.name, runId, action },\n      'cmd.workflow_gate_continuation_unresolved'\n    );\n    continuation = { ok: false, message: err.message };\n  }\n  if (!continuation.ok) {\n    const hint =\n      continuation.resumeHint ?? `Resume it with \\`/workflow resume ${runId}\\` once that is fixed.`;\n    return {\n      success: true,\n      message: `${headline}\\nThe run could not be continued automatically: ${continuation.message}\\n${hint}`,\n    };\n  }\n  return {\n    success: true,\n    message: `${headline}\\nResuming \\`${continuation.workflowName}\\`...`,\n    workflow: continuation.workflow,\n  };\n}\n\nasync function handleWorktreeCommand(\n  conversation: Conversation,","sourceCodeStart":386,"sourceCodeEnd":422,"githubUrl":"https://github.com/coleam00/Archon/blob/0773b9745896ef0612e709c80845a0f7db315b19/packages/core/src/handlers/command-handler.ts#L386-L422","documentation":"A message returned when a workflow gate continuation cannot be resolved: the handler caught an error while attempting to continue a paused run (logged as cmd.workflow_gate_continuation_unresolved with the error type and runId). The command still reports success:true but includes this err.message plus a resume hint telling the user to run `/workflow resume <runId>` once the blocker is fixed.","triggerScenarios":"Calling handleWorkflowCommand for a gate action (approve/reject) on a paused run, and the continuation attempt throws — e.g. the run's state changed since the gate was evaluated, the workflow definition is missing or changed, or an internal store error occurred during resume.","commonSituations":"Two operators acting on the same gate simultaneously; workflow YAML edited between pause and resume so the continuation no longer matches; database connectivity problems during the continuation write.","solutions":["Follow the hint in the message: run `/workflow resume <runId>` after addressing any stated blocker.","Check the run's current state (`/workflow status <runId>`) — it may already be resolved by another actor.","Inspect the structured log event cmd.workflow_gate_continuation_unresolved for the underlying errorType and stack.","If the workflow definition changed mid-run, re-run the workflow from scratch instead of resuming."],"exampleFix":"// before\n/workflow approve 42   # -> continuation unresolved\n// after\n/workflow status 42\n/workflow resume 42","handlingStrategy":"retry","validationCode":"// Before acting on a gate, confirm the run is still paused and resolvable:\nconst run = await getRun(runId);\nif (run.status !== 'paused') throw new Error(`run ${runId} is ${run.status}, not paused`);","typeGuard":null,"tryCatchPattern":"const res = await handleWorkflowCommand(action, runId);\nif (res.success && /continuation|resume/i.test(res.message)) {\n  // follow the embedded hint:\n  await resumeRun(runId); // or surface `/workflow resume <runId>` to the user\n}","preventionTips":["Check run status before approving/rejecting a gate.","Avoid editing workflow YAML while runs are paused against it.","Coordinate gate actions among operators to prevent concurrent continuation races.","Watch the cmd.workflow_gate_continuation_unresolved log event to diagnose root causes."],"tags":["workflow","gate","resume"],"backgroundTag":"workflow-continuation-unresolved","analyzedSha":"0773b9745896ef0612e709c80845a0f7db315b19","analyzedAt":"2026-09-01T02:28:07.064Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}