coleam00/Archon · error · Error

Detached workflow child cannot find the run '${options.detac

Error message

Detached workflow child cannot find the run '${options.detachedRunId}' its launcher created.

What it means

Error "Detached workflow child cannot find the run '${options.detachedRunId}' its launcher created." thrown in coleam00/Archon.

Source

Thrown at packages/cli/src/commands/workflow.ts:1494

  // parent launched this process.
  //
  // The catastrophic outcomes are closed by the other two, which hold no matter how the
  // first is satisfied. `status === 'pending'` is what stops a stale or mistyped id from
  // loading a TERMINAL row, whose DAG the executor would re-run, appending events onto
  // closed evidence. The `workflow_name` match (checked once the workflow resolves,
  // below) is what stops one launch's row being executed as another workflow. Neither is
  // redundant with the process-group check, and removing either reopens its own outcome.
  let detachedPreCreatedRun: WorkflowRun | undefined;
  if (options.detachedRunId !== undefined) {
    if (!detachedProcessOwner) {
      throw new Error(
        '--internal-detached-run-id is set by a detached launch for its own child. ' +
          'Use `archon workflow run <name> --detach`.'
      );
    }
    detachedPreCreatedRun = (await workflowDb.getWorkflowRun(options.detachedRunId)) ?? undefined;
    if (!detachedPreCreatedRun) {
      throw new Error(
        `Detached workflow child cannot find the run '${options.detachedRunId}' its launcher created.`
      );
    }
    if (detachedPreCreatedRun.status !== 'pending') {
      throw new Error(
        `Cannot execute run '${detachedPreCreatedRun.id}': it is ${detachedPreCreatedRun.status}, ` +
          'not a run awaiting its first execution. Resume it with `archon workflow resume` instead.'
      );
    }
  }

  let preparedSource: PreparedWorkflowSource | undefined;
  // Pinned at the moment of prepare so the SIGINT/SIGTERM cleanup never rm's a
  // path a live run is reading from. For `--container` folder-codebase runs,
  // `finalizeWorkflowSource` (workflow.ts:1749) reassigns `preparedSource` to a
  // new object whose `captureRoot` is the LIVE artifacts directory the run
  // executes from — rm-ing `preparedSource.captureRoot` on Ctrl-C mid-run would
  // destroy the run's source. The original staged path is renamed away by

View on GitHub (pinned to 0773b97458)

When it happens

Trigger: Thrown at packages/cli/src/commands/workflow.ts:1494 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of coleam00/Archon@0773b97458 (2026-09-01). Data as JSON: /api/errors/605556b393834f3a. Report an issue: GitHub.