coleam00/Archon · error · Error
Cannot supersede: no workflow run '${runId}' exists.
Error message
Cannot supersede: no workflow run '${runId}' exists. What it means
resolveSupersededRun() resolves the run named by a supersede option (--supersede) before starting a new run. getWorkflowRun returned null, meaning no workflow run with that id exists in the database, so the CLI refuses. Both the --detach pre-flight and the provenance-recording path share this owner (#2872).
Source
Thrown at packages/cli/src/commands/workflow.ts:739
function buildResumeLookupFailureError(error: Error): Error {
return new Error(
'Cannot resume: Database lookup failed.\n' +
`Error: ${error.message}\n` +
'Hint: Check your database connection before using --resume.'
);
}
/**
* Validate a `--supersedes` declaration (#2747): the run must exist and be terminal.
* Supersede inherits nothing, so existence and terminality are the whole contract.
*
* One owner for the refusals because two callers need them: the `--detach` pre-flight,
* which refuses before forking (#2872), and the run path that records the provenance.
*/
async function resolveSupersededRun(runId: string): Promise<WorkflowRun> {
const superseded = await workflowDb.getWorkflowRun(runId);
if (!superseded) {
throw new Error(`Cannot supersede: no workflow run '${runId}' exists.`);
}
if (!TERMINAL_WORKFLOW_STATUSES.includes(superseded.status)) {
throw new Error(`Cannot supersede run '${superseded.id}': it is still ${superseded.status}.`);
}
return superseded;
}
/**
* The acting CLI user's Archon id, or undefined when `ARCHON_USER_ID`/`$USER` is unset
* or the identity cannot be resolved. Attribution is best-effort by design — a run must
* not fail because the user table could not be reached.
*/
async function resolveCliUserRecordId(): Promise<string | undefined> {
const cliId = resolveCliUserId();
if (!cliId) return undefined;
try {
const cliUser = await userDb.findOrCreateUserByPlatformIdentity('cli', cliId, cliId);
return cliUser.id;View on GitHub (pinned to 0773b97458)
Solutions
- List existing runs (`archon runs` / `archon workflow list`) and copy the exact run id.
- Confirm you are pointed at the same database the original run used.
- If you only want to start a new run, drop the --supersede flag instead.
Example fix
// before (truncated id) $ archon workflow run foo --supersede wf_a1b2 Error: Cannot supersede: no workflow run 'wf_a1b2' exists. // after (full id from `archon workflow list`) $ archon workflow run foo --supersede wf_a1b2c3d4e5f6
Defensive patterns
Strategy: validation
Validate before calling
// check the id exists before passing --supersede
import { workflowDb } from '@archon/core';
const run = await workflowDb.getWorkflowRun(runId);
if (!run) throw new Error(`--supersede id not found: ${runId}`); Try / catch
try {
await runWorkflow(name, { supersede: runId });
} catch (e) {
if (String((e as Error).message).includes('no workflow run')) {
console.error(`Run id ${runId} not found; list runs and copy the exact id.`);
}
} Prevention
- Copy run ids from `archon workflow list` output, never retype them.
- Ensure you are on the same install/database that created the run.
- Drop --supersede entirely when you simply want a fresh run.
When it happens
Trigger: Passing --supersede <runId> where runId is a typo, belongs to a different install/database, references a run that was deleted, or is an id from another id space (e.g. a session or task id instead of a workflow run id).
Common situations: Copy-paste truncating the run id; switching databases (dev vs production) so the id is unknown; trying to supersede a run on another machine's install; using an old id after the DB was reset.
Understand the failure class
Background: "Not found" and "does not exist" errors: why "Task not found", "No such folder", and "Can't find" fire when a lookup comes back empty — this error's family across 14 libraries.
Related errors
- Cannot supersede run '${superseded.id}': it is still ${super
- --resume and --config are mutually exclusive. A resumed run
- Failed to download web UI: ${tarballRes.status} ${tarballRes
- Failed to read version: package.json is malformed
- Failed to start detached workflow child (executable: ${cmd[0
AI-assisted analysis of coleam00/Archon@0773b97458 (2026-09-01).
Data as JSON: /api/errors/36704fd8557994b5.
Report an issue: GitHub.