{"record":{"id":"2cf347c6dbb8582c","repo":"coleam00/Archon","slug":"no-workflow-run-matches-prefix-runid-in-this","errorCode":null,"errorMessage":"No workflow run matches prefix '${runId}' in this project.","messagePattern":"No workflow run matches prefix '(.+?)' in this project\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/cli/src/commands/workflow.ts","lineNumber":4090,"sourceCode":"  }\n  const resolvedCodebaseId =\n    codebaseId ?? (cwd === undefined ? undefined : (await findCodebaseForCheckoutPath(cwd))?.id);\n  if (!resolvedCodebaseId) {\n    if (requirePrefixMatch) {\n      throw new Error(`Cannot resolve run id prefix '${runId}' outside a registered project.`);\n    }\n    return runId;\n  }\n  const matches = await workflowDb.findWorkflowRunsByIdPrefix(runId, resolvedCodebaseId);\n  if (matches.length > 1) {\n    const candidates = matches.map(match => `  ${match.id}`).join('\\n');\n    throw new Error(\n      `Run id '${runId}' matches more than one run in this project:\\n${candidates}\\nUse more characters or the full id.`\n    );\n  }\n  if (matches.length === 0) {\n    if (requirePrefixMatch) {\n      throw new Error(`No workflow run matches prefix '${runId}' in this project.`);\n    }\n    return runId;\n  }\n  return matches[0].id;\n}\n\n/**\n * Shared `--detach` front half for `approve`/`reject`/`resume`. Validates the run\n * READ-ONLY via `precheck`, then hands the whole command to a detached child that\n * re-invokes the same argv (minus `--detach`/`--json`) and owns ALL state mutation\n * in its own process group — so killing the shell that hosted the parent cannot\n * zombie the run mid-resume. The parent must never call\n * approveWorkflow/rejectWorkflow/resumeWorkflow itself, or the decision would be\n * recorded twice (mirrors workflowRunCommand's detach shape: the parent does nothing).\n *\n * Spawns with the command's `cwd` (falling back to `process.cwd()`), never the run's\n * working_path: the child re-resolves everything by run-id, and a container run's\n * working_path is a distro path the host cannot spawn into (ENOENT → the detach would","sourceCodeStart":4072,"sourceCodeEnd":4108,"githubUrl":"https://github.com/coleam00/Archon/blob/0773b9745896ef0612e709c80845a0f7db315b19/packages/cli/src/commands/workflow.ts#L4072-L4108","documentation":"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.","triggerScenarios":"`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.","commonSituations":"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.","solutions":["Verify you are in the correct project checkout; prefix lookup is scoped to the current codebase.","Use `archon workflow runs --all` to find the run globally and copy its full id.","Recheck the prefix characters against the source id (copy/paste rather than retyping)."],"exampleFix":"// before\ncd ~/projects/other-app && archon workflow get ab12   # run belongs to my-app\n// after\ncd ~/projects/my-app && archon workflow get ab12","handlingStrategy":"validation","validationCode":"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`);","typeGuard":null,"tryCatchPattern":"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 */ } }","preventionTips":["Copy ids by paste, never retype from memory or screenshots.","Confirm the target run's project matches the current checkout before prefix lookup.","Fall back to `workflow runs --all` search by date/status when the id is uncertain."],"tags":["cli","workflow","not-found"],"backgroundTag":"resource-not-found","analyzedSha":"0773b9745896ef0612e709c80845a0f7db315b19","analyzedAt":"2026-09-01T02:28:07.064Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}