coleam00/Archon · error · Error

No workflow run matches prefix '${runId}' in this project.

Error message

No workflow run matches prefix '${runId}' in this project.

What it means

The provided run-id prefix matched zero runs in the resolved project. Like the ambiguous case, this only throws when requirePrefixMatch is set; otherwise the raw value passes through.

Source

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

  }
  const resolvedCodebaseId =
    codebaseId ?? (cwd === undefined ? undefined : (await findCodebaseForCheckoutPath(cwd))?.id);
  if (!resolvedCodebaseId) {
    if (requirePrefixMatch) {
      throw new Error(`Cannot resolve run id prefix '${runId}' outside a registered project.`);
    }
    return runId;
  }
  const matches = await workflowDb.findWorkflowRunsByIdPrefix(runId, resolvedCodebaseId);
  if (matches.length > 1) {
    const candidates = matches.map(match => `  ${match.id}`).join('\n');
    throw new Error(
      `Run id '${runId}' matches more than one run in this project:\n${candidates}\nUse more characters or the full id.`
    );
  }
  if (matches.length === 0) {
    if (requirePrefixMatch) {
      throw new Error(`No workflow run matches prefix '${runId}' in this project.`);
    }
    return runId;
  }
  return matches[0].id;
}

/**
 * Shared `--detach` front half for `approve`/`reject`/`resume`. Validates the run
 * READ-ONLY via `precheck`, then hands the whole command to a detached child that
 * re-invokes the same argv (minus `--detach`/`--json`) and owns ALL state mutation
 * in its own process group — so killing the shell that hosted the parent cannot
 * zombie the run mid-resume. The parent must never call
 * approveWorkflow/rejectWorkflow/resumeWorkflow itself, or the decision would be
 * recorded twice (mirrors workflowRunCommand's detach shape: the parent does nothing).
 *
 * Spawns with the command's `cwd` (falling back to `process.cwd()`), never the run's
 * working_path: the child re-resolves everything by run-id, and a container run's
 * working_path is a distro path the host cannot spawn into (ENOENT → the detach would

View on GitHub (pinned to 0773b97458)

Solutions

  1. Verify you are in the correct project checkout; prefix lookup is scoped to the current codebase.
  2. Use `archon workflow runs --all` to find the run globally and copy its full id.
  3. Recheck the prefix characters against the source id (copy/paste rather than retyping).

Example fix

// before
cd ~/projects/other-app && archon workflow get ab12   # run belongs to my-app
// after
cd ~/projects/my-app && archon workflow get ab12
Defensive patterns

Strategy: validation

Validate before calling

const runs = await listRuns({ json: true, all: true }); if (!runs.some(r => r.id.startsWith(prefix))) throw new Error(`no run matches ${prefix}; check project and id`);

Try / catch

try { await getRun(prefix); } catch (e) { if (String(e.message).startsWith('No workflow run matches prefix')) { const all = await listRuns({ json: true, all: true }); /* locate run in another project */ } }

Prevention

When it happens

Trigger: `workflow get/resume/approve <prefix>` where no run in the current project's codebase starts with that prefix — typo in prefix, run belongs to a different project, or the run was deleted.

Common situations: Running in the wrong checkout (the run lives in another registered project), stale ids from old databases, truncated ids copied incorrectly from logs or Slack.

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


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