{"record":{"id":"33df1d66e6c67cdd","repo":"coleam00/Archon","slug":"no-workflows-found-in-archon-workflows","errorCode":null,"errorMessage":"No workflows found in .archon/workflows/","messagePattern":"No workflows found in \\.archon/workflows/","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/cli/src/commands/workflow.ts","lineNumber":1555,"sourceCode":"  let { workflows: workflowEntries, errors } = continuation\n    ? { workflows: continuation.workflows, errors: continuation.errors }\n    : preparedSource\n      ? await discoverWorkflowsWithConfig(cwd, loadConfig, preparedSource.roots)\n      : await loadWorkflows(effectiveDiscoveryCwd);\n  const sourceCounts = countWorkflowSources(workflowEntries);\n\n  if (!options.json && !options.quiet) {\n    console.log(\n      `Discovery: root=${effectiveDiscoveryCwd} workflows=${String(workflowEntries.length)} ` +\n        `bundled=${String(sourceCounts.bundled)} global=${String(sourceCounts.global)} ` +\n        `project=${String(sourceCounts.project)}`\n    );\n  }\n\n  if (workflowEntries.length === 0 && errors.length === 0) {\n    // No manual cleanup here or anywhere else in this function: the owner reclaims\n    // anything unadopted on the way out, which is the point of having one.\n    throw new Error('No workflows found in .archon/workflows/');\n  }\n\n  const workflows = workflowEntries.map(ws => ws.workflow);\n\n  // A continuation executes the graph it froze; only a fresh invocation resolves by name.\n  let workflow = continuation?.workflow ?? resolveWorkflowName(workflowName, workflows);\n  // Recover the discovery entry (dropped by the .map above) for telemetry —\n  // bundled workflows report their real name, custom ones report \"custom\" —\n  // and for the parse warnings surfaced just below.\n  let workflowEntry = workflow ? workflowEntries.find(ws => ws.workflow === workflow) : undefined;\n  let workflowSource = workflowEntry?.source;\n\n  // An adoption lane that executes inside an inherited or freshly cut worktree must run\n  // THAT checkout's `.archon`, not the parent checkout's bytes captured on entry — the\n  // branch may carry a different workflow YAML, and executing one against the other is\n  // exactly the mixed-vintage defect (#2660/#2747). Re-freeze the source and re-discover\n  // from the lane path once the lane resolves it.\n  const recaptureForLane = async (sourceRoot: string): Promise<void> => {","sourceCodeStart":1537,"sourceCodeEnd":1573,"githubUrl":"https://github.com/coleam00/Archon/blob/0773b9745896ef0612e709c80845a0f7db315b19/packages/cli/src/commands/workflow.ts#L1537-L1573","documentation":"Error \"No workflows found in .archon/workflows/\" thrown in coleam00/Archon.","triggerScenarios":"Thrown at packages/cli/src/commands/workflow.ts:1555 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"}