coleam00/Archon · error · Error
Workflow run not found: ${resolvedId}
Error message
Workflow run not found: ${resolvedId} What it means
Thrown by the active-cancel path when `workflowDb.getWorkflowRun(resolvedId)` cannot find a run matching the resolved ID. The CLI resolves partial IDs first; if nothing matches in the database, there is no run to cancel and it fails with this message.
Source
Thrown at packages/cli/src/commands/workflow.ts:4393
*
* Ordering is the contract: prove the live exact-run owner, terminate its process
* tree, then record `cancelled`. An unreachable owner never falls back to a DB-only
* transition — operators use `abandon` separately after verifying an orphan.
*/
export async function workflowCancelCommand(
runId: string,
json?: boolean,
cwd?: string
): Promise<void> {
const cancel = async (): Promise<{
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') {View on GitHub (pinned to 0773b97458)
Solutions
- Run `archon workflow list` (or `archon workflow runs`) and copy the exact current run ID
- Confirm you are operating on the same Archon install/workspace/database that owns the run
- Retry with the full run ID rather than a partial prefix
Example fix
// before
await cancelWorkflow('abc12');
// after
const runs = await listWorkflowRuns();
const run = runs.find(r => r.id.startsWith('abc12'));
if (!run) throw new Error(`no run matches abc12 — check 'archon workflow list'`);
await cancelWorkflow(run.id); Defensive patterns
Strategy: validation
Validate before calling
const run = await workflowDb.getWorkflowRun(id);
if (!run) throw new Error(`run ${id} not found — check 'archon workflow list'`); Try / catch
try {
await cancelWorkflow(id);
} catch (e) {
if (String(e).includes('not found')) console.error('bad run ID; list runs and retry');
else throw e;
} Prevention
- Copy run IDs from `archon workflow list` on the same install
- Use full IDs, not hand-truncated prefixes
- Don't reference IDs from a reset or different database
When it happens
Trigger: Calling `archon workflow cancel <id>` (detached/active cancel flow) with a mistyped or truncated ID, an ID from a different install/database, or a run that has been deleted.
Common situations: Copy-pasting a run ID from another machine or environment; using a stale ID after the DB was reset; typos or wrong prefix when passing a partial ID.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- No workflow run matches prefix '${runId}' in this project.
- Cannot actively cancel run with status '${current.status}'.
- Cannot confirm the isolation container owned by run ${resolv
- Cannot confirm the isolation container owned by run ${resolv
- Detached owner process stopped, but the isolation container
AI-assisted analysis of coleam00/Archon@0773b97458 (2026-09-01).
Data as JSON: /api/errors/c3aeabb99bad477b.
Report an issue: GitHub.