coleam00/Archon · error · Error
--internal-detached-run-id is set by a detached launch for i
Error message
--internal-detached-run-id is set by a detached launch for its own child. Use `archon workflow run <name> --detach`.
What it means
Error "--internal-detached-run-id is set by a detached launch for its own child. Use `archon workflow run <name> --detach`." thrown in coleam00/Archon.
Source
Thrown at packages/cli/src/commands/workflow.ts:1487
// Be precise about which one carries the weight, because it is not the first.
//
// The owner marker plus `assertDetachedRunProcessOwner` (above) raise the bar, they do
// not prove provenance: a plain scripted process is not its own process-group leader,
// so cron, CI, and wrapper scripts are blocked — but a foreground command under a real
// pseudo-tty IS one by default, so a person setting the env var at their own terminal
// satisfies it. Treat it as a barrier to automated misuse, not as proof that an Archon
// 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.'
);
}
}
View on GitHub (pinned to 0773b97458)
When it happens
Trigger: Thrown at packages/cli/src/commands/workflow.ts:1487 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/e7afb586a48b6e32.
Report an issue: GitHub.