coleam00/Archon · error · Error

Detached owner process stopped, but the isolation container

Error message

Detached owner process stopped, but the isolation container could not be confirmed stopped. Run state was not changed. ${(error as Error).message}

What it means

During active cancel, the detached owner process was stopped successfully but `reclaimContainerEnv` failed, so the CLI cannot confirm the isolation container is down. The run's state is intentionally NOT transitioned to cancelled — the operator gets a half-completed report rather than a silently orphaned container.

Source

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

      }
      containerEnvId = isolationEnvId;
      const containerEnv = await isolationDb.getById(containerEnvId);
      if (containerEnv?.provider !== 'container') {
        throw new Error(
          `Cannot confirm the isolation container owned by run ${resolvedId}. ` +
            'The run was not changed; inspect the managed containers before retrying or abandoning it.'
        );
      }
    }

    const target = await requestDetachedRunStop(resolvedId);
    await target.stop();

    if (containerEnvId) {
      try {
        await reclaimContainerEnv(containerEnvId);
      } catch (error) {
        throw new Error(
          'Detached owner process stopped, but the isolation container could not be confirmed stopped. ' +
            `Run state was not changed. ${(error as Error).message}`
        );
      }
    }

    const { run, cancelled, cascadeFailures, blockedParentRunId } =
      await abandonWorkflow(resolvedId);
    if (!cancelled) {
      const latest = await workflowDb.getWorkflowRun(resolvedId);
      throw new Error(
        'Detached work stopped, but cancellation did not win the run state transition. ' +
          `The run status is ${latest?.status ?? 'unknown'}; it was not reported as cancelled.`
      );
    }
    return {
      resolvedId,
      workflowName: run.workflow_name,

View on GitHub (pinned to 0773b97458)

Solutions

  1. Check the container runtime (`docker ps -a`) to see the container's actual state
  2. Resolve the runtime issue (start the daemon, fix permissions), then retry the cancel
  3. If the container is already gone, verify and reconcile the run state manually before forcing a cancel

Example fix

// before
await cancelWorkflow(runId); // half-stops, throws
// after
try { await cancelWorkflow(runId); }
catch (e) { console.error('container reclaim failed:', (e as Error).message); /* check docker ps, retry */ }
Defensive patterns

Strategy: try-catch

Validate before calling

// precheck the runtime before cancel
await exec('docker', ['info']); // fails fast if daemon is down

Try / catch

try {
  await cancelWorkflow(id);
} catch (e) {
  if (String(e).includes('isolation container could not be confirmed')) {
    console.error('owner stopped but container state unknown; run docker ps -a and reconcile');
  } else throw e;
}

Prevention

When it happens

Trigger: Cancelling a container-isolated running run where the container runtime call fails: Docker/containerd daemon down, container already removed externally, timeout, or permission error during reclaim.

Common situations: Docker daemon not running or restarted; container was manually `docker rm`'d while the run was active; resource/permission issues in the container runtime; network/registry hiccup during teardown.

Related errors


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