{"record":{"id":"605556b393834f3a","repo":"coleam00/Archon","slug":"detached-workflow-child-cannot-find-the-run-opt","errorCode":null,"errorMessage":"Detached workflow child cannot find the run '${options.detachedRunId}' its launcher created.","messagePattern":"Detached workflow child cannot find the run '(.+?)' its launcher created\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/cli/src/commands/workflow.ts","lineNumber":1494,"sourceCode":"  // parent launched this process.\n  //\n  // The catastrophic outcomes are closed by the other two, which hold no matter how the\n  // first is satisfied. `status === 'pending'` is what stops a stale or mistyped id from\n  // loading a TERMINAL row, whose DAG the executor would re-run, appending events onto\n  // closed evidence. The `workflow_name` match (checked once the workflow resolves,\n  // below) is what stops one launch's row being executed as another workflow. Neither is\n  // redundant with the process-group check, and removing either reopens its own outcome.\n  let detachedPreCreatedRun: WorkflowRun | undefined;\n  if (options.detachedRunId !== undefined) {\n    if (!detachedProcessOwner) {\n      throw new Error(\n        '--internal-detached-run-id is set by a detached launch for its own child. ' +\n          'Use `archon workflow run <name> --detach`.'\n      );\n    }\n    detachedPreCreatedRun = (await workflowDb.getWorkflowRun(options.detachedRunId)) ?? undefined;\n    if (!detachedPreCreatedRun) {\n      throw new Error(\n        `Detached workflow child cannot find the run '${options.detachedRunId}' its launcher created.`\n      );\n    }\n    if (detachedPreCreatedRun.status !== 'pending') {\n      throw new Error(\n        `Cannot execute run '${detachedPreCreatedRun.id}': it is ${detachedPreCreatedRun.status}, ` +\n          'not a run awaiting its first execution. Resume it with `archon workflow resume` instead.'\n      );\n    }\n  }\n\n  let preparedSource: PreparedWorkflowSource | undefined;\n  // Pinned at the moment of prepare so the SIGINT/SIGTERM cleanup never rm's a\n  // path a live run is reading from. For `--container` folder-codebase runs,\n  // `finalizeWorkflowSource` (workflow.ts:1749) reassigns `preparedSource` to a\n  // new object whose `captureRoot` is the LIVE artifacts directory the run\n  // executes from — rm-ing `preparedSource.captureRoot` on Ctrl-C mid-run would\n  // destroy the run's source. The original staged path is renamed away by","sourceCodeStart":1476,"sourceCodeEnd":1512,"githubUrl":"https://github.com/coleam00/Archon/blob/0773b9745896ef0612e709c80845a0f7db315b19/packages/cli/src/commands/workflow.ts#L1476-L1512","documentation":"Error \"Detached workflow child cannot find the run '${options.detachedRunId}' its launcher created.\" thrown in coleam00/Archon.","triggerScenarios":"Thrown at packages/cli/src/commands/workflow.ts:1494 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"}