coleam00/Archon · error · Error
Cannot confirm the isolation container owned by run ${resolv
Error message
Cannot confirm the isolation container owned by run ${resolvedId}. The run was not changed; its container tracking ID is missing. What it means
When actively cancelling a run isolated in a container, the CLI must know which managed container to confirm/stop. If the run's metadata says `isolation: 'container'` but `isolation_env_id` is missing or blank, the run is deliberately left unchanged because proceeding could orphan the container.
Source
Thrown at packages/cli/src/commands/workflow.ts:4404
resolvedId: string;
workflowName: string;
cascadeFailures: number;
blockedParentRunId: string | null;
}> => {
const resolvedId = await resolveRunIdArg(runId, cwd);
const current = await workflowDb.getWorkflowRun(resolvedId);
if (!current) throw new Error(`Workflow run not found: ${resolvedId}`);
if (current.status !== 'running') {
throw new Error(
`Cannot actively cancel run with status '${current.status}'. Only a running detached CLI run has live work to stop.`
);
}
let containerEnvId: string | undefined;
if (current.metadata?.isolation === 'container') {
const isolationEnvId = current.metadata.isolation_env_id;
if (typeof isolationEnvId !== 'string' || isolationEnvId.trim().length === 0) {
throw new Error(
`Cannot confirm the isolation container owned by run ${resolvedId}. ` +
'The run was not changed; its container tracking ID is missing.'
);
}
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) {View on GitHub (pinned to 0773b97458)
Solutions
- Inspect the run's metadata and the isolation DB to locate the container manually (`isolationDb.getById`)
- Stop/reclaim the container through the isolation tooling, then cancel the run once its tracking is consistent
- If the container is already gone, repair or clear the run's isolation metadata on a scratch DB before cancelling
Example fix
// before
await cancelWorkflow(runId); // throws: missing isolation_env_id
// after
const run = await getWorkflowRun(runId);
if (run.metadata?.isolation === 'container' && !run.metadata?.isolation_env_id) {
console.error('run has container isolation but no tracking ID; inspect managed containers first');
} else { await cancelWorkflow(runId); } Defensive patterns
Strategy: validation
Validate before calling
const run = await workflowDb.getWorkflowRun(id);
if (run.metadata?.isolation === 'container' &&
(typeof run.metadata?.isolation_env_id !== 'string' || !run.metadata.isolation_env_id.trim())) {
throw new Error('container-isolated run is missing isolation_env_id; inspect managed containers first');
} Type guard
function hasContainerTracking(m: RunMetadata | undefined): m is RunMetadata & { isolation: 'container'; isolation_env_id: string } {
return m?.isolation === 'container' && typeof m.isolation_env_id === 'string' && m.isolation_env_id.trim().length > 0;
} Prevention
- Don't manually edit run metadata
- Upgrade runs created before container tracking rather than cancelling them blindly
- Audit container-isolated runs for missing isolation_env_id before batch cancels
When it happens
Trigger: Cancelling a container-isolated run whose row metadata lacks `isolation_env_id` (older run predating container tracking, or corrupted metadata).
Common situations: Runs created before isolation tracking shipped; metadata lost through manual DB edits or partial restores; container was provisioned outside Archon's tracking.
Related errors
- Cannot confirm the isolation container owned by run ${resolv
- Detached owner process stopped, but the isolation container
- Workflow run not found: ${resolvedId}
- Cannot actively cancel run with status '${current.status}'.
- Detached work stopped, but cancellation did not win the run
AI-assisted analysis of coleam00/Archon@0773b97458 (2026-09-01).
Data as JSON: /api/errors/9fd580daca40906d.
Report an issue: GitHub.