{"record":{"id":"fd66b55d754865a4","repo":"coleam00/Archon","slug":"workflow-run-resolvedid-has-no-working-path-r","errorCode":null,"errorMessage":"Workflow run '${resolvedId}' has no working path recorded.\nCannot determine where to resume. The run may be too old.","messagePattern":"Workflow run '(.+?)' has no working path recorded\\.\nCannot determine where to resume\\. The run may be too old\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/cli/src/commands/workflow.ts","lineNumber":4232,"sourceCode":"export async function workflowResumeCommand(\n  runId: string,\n  json?: boolean,\n  cwd?: string,\n  detach?: boolean\n): Promise<void> {\n  // --detach: validate read-only (resumeWorkflowOp checks the run is resumable),\n  // then let a detached child re-invoke the blocking resume and own all mutation\n  // + execution, so a reaped launching shell can't wedge the run mid-resume.\n  // Composes with --json (structured ack; nothing executes here).\n  if (detach) {\n    const resolvedId = await resolveRunIdArg(runId, cwd);\n    await runDetachedControlCommand(resolvedId, 'resume', json, cwd, async () => {\n      const run = await resumeWorkflowOp(resolvedId);\n      // The inline path below refuses a run with no recorded working path. Check it\n      // here too, on the run the precheck already holds (message copied verbatim):\n      // otherwise the parent acks success and the child throws where nobody reads it.\n      if (!run.working_path) {\n        throw new Error(\n          `Workflow run '${resolvedId}' has no working path recorded.\\n` +\n            'Cannot determine where to resume. The run may be too old.'\n        );\n      }\n      return run;\n    });\n    return;\n  }\n\n  // JSON mode is a non-blocking control-plane ack: validate the run is resumable\n  // and report its state, but do NOT re-execute the workflow inline (execution\n  // streams workflow output to stdout, which would corrupt the JSON contract).\n  // To actually execute a resumable run, use the blocking `resume` (no --json,\n  // run as a background task) or `resume <run-id> --detach`. Prefer that exact-id\n  // form over `run <name> --resume --detach`, which selects the newest resumable\n  // run of that workflow in the CURRENT checkout — a different question, and the\n  // wrong one when the caller already holds a run id (#2645).\n  if (json) {","sourceCodeStart":4214,"sourceCodeEnd":4250,"githubUrl":"https://github.com/coleam00/Archon/blob/0773b9745896ef0612e709c80845a0f7db315b19/packages/cli/src/commands/workflow.ts#L4214-L4250","documentation":"Thrown by the detached-resume precheck in the Archon CLI before spawning a child `workflow resume` control command. A workflow run row without a `working_path` gives the resume operation no directory to re-enter, so the CLI refuses up front instead of acking success and failing invisibly in the detached child. It indicates a run persisted before working-path recording existed (or otherwise missing path data).","triggerScenarios":"Calling `archon workflow resume <id> --detach` (or the JSON variant) where `resumeWorkflowOp(resolvedId)` returns a run whose `working_path` column is null/empty.","commonSituations":"Resuming a very old run created by an earlier Archon version that did not record working paths; a database row manually edited or restored from a partial backup; a run whose workspace directory bookkeeping was lost.","solutions":["List runs and pick a newer run that has a working path (`archon workflow list`), resuming that instead","Re-run the workflow from scratch rather than resuming the legacy run","Inspect the run row and, if the path is known, re-establish it via direct DB repair on a scratch copy before retrying"],"exampleFix":"// before\nawait resumeWorkflowOp(oldRunId);\n// after\nconst run = await getRunById(oldRunId);\nif (!run?.working_path) { console.error('Run has no working path; start a new run'); } else { await resumeWorkflowOp(oldRunId); }","handlingStrategy":"validation","validationCode":"const run = await workflowDb.getWorkflowRun(id);\nif (!run) throw new Error(`run ${id} not found`);\nif (!run.working_path) throw new Error(`run ${id} predates working-path tracking; start a new run`);","typeGuard":"function hasWorkingPath(run: { working_path?: string | null }): run is typeof run & { working_path: string } {\n  return typeof run.working_path === 'string' && run.working_path.length > 0;\n}","tryCatchPattern":null,"preventionTips":["Prefer resuming recent runs; treat very old runs as start-from-scratch candidates","Before scripting bulk resumes, filter runs on working_path IS NOT NULL","Keep Archon upgraded so rows always carry working-path metadata"],"tags":["cli","workflow","resume","data-missing"],"backgroundTag":"missing-working-path","analyzedSha":"0773b9745896ef0612e709c80845a0f7db315b19","analyzedAt":"2026-09-01T02:28:07.064Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}