{"record":{"id":"aad6b48a516bdc82","repo":"coleam00/Archon","slug":"workflow-workflowname-failed-to-load-loade","errorCode":null,"errorMessage":"Workflow '${workflowName}' failed to load: ${loadError.error}\n\nFix the YAML file and try again.","messagePattern":"Workflow '(.+?)' failed to load: (.+?)\n\nFix the YAML file and try again\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/cli/src/commands/workflow.ts","lineNumber":1640,"sourceCode":"    await assertCliWorkflowRequirementsMet(workflow);\n  };\n\n  // Name the selection in the capture's manifest, now that it is known. The manifest is\n  // outside the digest, so this records provenance without disturbing what was frozen.\n  if (workflow && preparedSource) {\n    await recordSelectedWorkflow(preparedSource.captureRoot, workflow.name);\n  }\n\n  if (!workflow) {\n    // Check if the requested workflow had a load error\n    const loadError = errors.find(\n      e =>\n        e.filename.replace(/\\.ya?ml$/, '') === workflowName ||\n        e.filename === `${workflowName}.yaml` ||\n        e.filename === `${workflowName}.yml`\n    );\n    if (loadError) {\n      throw new Error(\n        `Workflow '${workflowName}' failed to load: ${loadError.error}\\n\\nFix the YAML file and try again.`\n      );\n    }\n    const availableWorkflows = workflows.map(w => `  - ${w.name}`).join('\\n');\n    throw new Error(\n      `Workflow '${workflowName}' not found.\\n\\nAvailable workflows:\\n${availableWorkflows}`\n    );\n  }\n\n  // Second half of the handed-over row's claim check (#2872): the row must belong to the\n  // workflow being invoked. Checked here rather than at load because the row carries the\n  // RESOLVED name its launcher selected, and resolution needs discovery. It catches an\n  // id crossed between two concurrent detached launches, and the narrow window where the\n  // child's re-capture resolves a different workflow than the parent did.\n  if (detachedPreCreatedRun && detachedPreCreatedRun.workflow_name !== workflow.name) {\n    throw new Error(\n      `Cannot execute run '${detachedPreCreatedRun.id}': it belongs to workflow ` +\n        `'${detachedPreCreatedRun.workflow_name}', not '${workflow.name}'.`","sourceCodeStart":1622,"sourceCodeEnd":1658,"githubUrl":"https://github.com/coleam00/Archon/blob/0773b9745896ef0612e709c80845a0f7db315b19/packages/cli/src/commands/workflow.ts#L1622-L1658","documentation":"Error \"Workflow '${workflowName}' failed to load: ${loadError.error}\n\nFix the YAML file and try again.\" thrown in coleam00/Archon.","triggerScenarios":"Thrown at packages/cli/src/commands/workflow.ts:1640 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0773b9745896ef0612e709c80845a0f7db315b19","analyzedAt":"2026-09-01T02:28:07.064Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}