{"record":{"id":"2ab1001ca8f0264d","repo":"coleam00/Archon","slug":"base-has-no-effect-with-no-worktree-remove","errorCode":null,"errorMessage":"--base has no effect with --no-worktree.\nRemove --base or drop --no-worktree.","messagePattern":"--base has no effect with --no-worktree\\.\nRemove --base or drop --no-worktree\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/cli/src/commands/workflow.ts","lineNumber":1835,"sourceCode":"\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(\n      '--resume and --input are mutually exclusive.\\n' +\n        \"  A resume replays the original invocation's inputs, recorded on the run.\\n\" +\n        '  Drop --input to resume, or start a fresh run to supply different values.'\n    );\n  }\n","sourceCodeStart":1817,"sourceCodeEnd":1853,"githubUrl":"https://github.com/coleam00/Archon/blob/0773b9745896ef0612e709c80845a0f7db315b19/packages/cli/src/commands/workflow.ts#L1817-L1853","documentation":"The Archon CLI's workflow-start preflight in packages/cli/src/commands/workflow.ts rejects flag combinations that cannot be honored. `--base` (baseBranch) only controls which branch a new git worktree is cut from; when `--no-worktree` is passed the run executes in the live checkout, so `--base` would be silently ignored. The CLI fails loudly instead of dropping the flag.","triggerScenarios":"Running `archon workflow start <name> --no-worktree --base <branch>` (or setting options.baseBranch programmatically alongside options.noWorktree in the workflow-start options object).","commonSituations":"Scripts templated from a worktree-based invocation being switched to `--no-worktree` for CI or quick local runs while keeping `--base`; users assuming `--base` influences the live-checkout run's behavior.","solutions":["Remove the `--base <branch>` flag from the command.","Remove `--no-worktree` if you actually need the run to start from a specific base branch.","If you need a specific starting point in the live checkout, check out the desired branch yourself before launching the run."],"exampleFix":"// before\narchon workflow start code-review --no-worktree --base main\n// after\narchon workflow start code-review --no-worktree","handlingStrategy":"validation","validationCode":"if (args.includes('--no-worktree') && args.includes('--base')) {\n  throw new Error('--base has no effect with --no-worktree; drop one of them.');\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep worktree-related flags (--base, --branch, --from, --no-worktree) in mutually exclusive script branches.","Template CI invocations without --base when they use --no-worktree."],"tags":["cli","flag-conflict","worktree","validation"],"backgroundTag":"mutually-exclusive-flags","analyzedSha":"0773b9745896ef0612e709c80845a0f7db315b19","analyzedAt":"2026-09-01T02:28:07.064Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}