{"record":{"id":"ee8aff06bcd2e287","repo":"coleam00/Archon","slug":"from-from-branch-has-no-effect-with-no-workt","errorCode":null,"errorMessage":"--from/--from-branch has no effect with --no-worktree.\nRemove --from or drop --no-worktree.","messagePattern":"--from/--from-branch has no effect with --no-worktree\\.\nRemove --from or drop --no-worktree\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/cli/src/commands/workflow.ts","lineNumber":1829,"sourceCode":"          ? `Dry-run failed; missing stubs: ${blockingMissingStubs.join(', ')}`\n          : 'Dry-run failed. See the trace for details.'\n      );\n    }\n    return;\n  }\n\n  // Validate mutually exclusive flags (defensive — cli.ts checks these for UX, but\n  // workflowRunCommand is the authoritative boundary for programmatic callers)\n  if (options.branchName !== undefined && options.noWorktree) {\n    throw new Error(\n      '--branch and --no-worktree are mutually exclusive.\\n' +\n        '  --branch creates an isolated worktree (safe).\\n' +\n        '  --no-worktree runs directly in your repo (no isolation).\\n' +\n        'Use one or the other.'\n    );\n  }\n  if (options.noWorktree && options.fromBranch !== undefined) {\n    throw new Error(\n      '--from/--from-branch has no effect with --no-worktree.\\n' +\n        'Remove --from or drop --no-worktree.'\n    );\n  }\n  if (options.noWorktree && options.baseBranch !== undefined) {\n    throw new Error(\n      '--base has no effect with --no-worktree.\\n' + 'Remove --base or drop --no-worktree.'\n    );\n  }\n  if (options.resume && options.branchName !== undefined) {\n    throw new Error(\n      '--resume and --branch are mutually exclusive.\\n' +\n        '  --resume reuses the existing worktree from the failed run.\\n' +\n        '  Remove --branch when using --resume.'\n    );\n  }\n  if (options.resume && options.inputs !== undefined && options.inputs.length > 0) {\n    throw new Error(","sourceCodeStart":1811,"sourceCodeEnd":1847,"githubUrl":"https://github.com/coleam00/Archon/blob/0773b9745896ef0612e709c80845a0f7db315b19/packages/cli/src/commands/workflow.ts#L1811-L1847","documentation":"`--from`/`--from-branch` selects a source branch to materialize a worktree from; with `--no-worktree` the run happens directly in the current repo, so the flag has nothing to act on. The CLI throws rather than silently ignoring it.","triggerScenarios":"`archon workflow run wf --no-worktree --from-branch main` (or --from), i.e. options.noWorktree set while options.fromBranch defined.","commonSituations":"Scripts that always pass --from-branch being reused in no-worktree mode; forgetting the flag is worktree-specific.","solutions":["Remove --from/--from-branch to run directly in the current repo","Or drop --no-worktree so the worktree is created from the given branch"],"exampleFix":"// before\narchon workflow run wf --no-worktree --from-branch main\n// after\narchon workflow run wf --from-branch main","handlingStrategy":"validation","validationCode":"if (args.includes('--no-worktree') && (args.includes('--from') || args.includes('--from-branch'))) {\n  throw new Error('--from/--from-branch has no effect with --no-worktree');\n}","typeGuard":null,"tryCatchPattern":"try {\n  await runWorkflow(args);\n} catch (e) {\n  if (/has no effect with --no-worktree/.test(String(e.message))) {\n    return runWorkflow(args.filter(a => a !== '--from' && !a.startsWith('--from-branch')));\n  }\n  throw e;\n}","preventionTips":["Treat --from/--from-branch as worktree-only flags","Filter branch-source flags when --no-worktree is set in scripts"],"tags":["cli","flags","worktree","mutually-exclusive"],"backgroundTag":"mutually-exclusive-flags","analyzedSha":"0773b9745896ef0612e709c80845a0f7db315b19","analyzedAt":"2026-09-01T02:28:07.064Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}