{"record":{"id":"03d1c9869bd2190c","repo":"coleam00/Archon","slug":"adopt-and-conflicts-join-are-mutually-ex","errorCode":null,"errorMessage":"--adopt and ${conflicts.join('/')} are mutually exclusive.\n  Adoption resolves its own lane: reuse the adopted worktree, or cut a fresh one from its branch.","messagePattern":"--adopt and (.+?) are mutually exclusive\\.\n  Adoption resolves its own lane: reuse the adopted worktree, or cut a fresh one from its branch\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/cli/src/commands/workflow.ts","lineNumber":1864,"sourceCode":"  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\n  // Between-run continuation (#2747): adoption dictates the lane itself, so the\n  // lane-choosing flags are refused rather than silently overridden.\n  if (options.adoptRunId !== undefined) {\n    const conflicts: string[] = [];\n    if (options.resume) conflicts.push('--resume');\n    if (options.branchName !== undefined) conflicts.push('--branch');\n    if (options.fromBranch !== undefined) conflicts.push('--from/--from-branch');\n    if (options.baseBranch !== undefined) conflicts.push('--base');\n    if (options.noWorktree) conflicts.push('--no-worktree');\n    if (conflicts.length > 0) {\n      throw new Error(\n        `--adopt and ${conflicts.join('/')} are mutually exclusive.\\n` +\n          '  Adoption resolves its own lane: reuse the adopted worktree, or cut a fresh one from its branch.'\n      );\n    }\n  } else if (options.supersedesRunId !== undefined && options.resume) {\n    throw new Error(\n      '--supersedes records a FRESH-lane rerun as replacing a prior open item; it cannot be combined with --resume.'\n    );\n  }\n\n  // Per-dispatch --base override, normalized once. Wins over repo config + the\n  // codebase default for both the worktree cut-from (the provider request's\n  // `baseOverride` below) and the PR target / $BASE_BRANCH (executeWorkflow's\n  // `baseOverride` opt). Both halves need their own channel: the `baseBranch`\n  // field on either side is the codebase-default FALLBACK and ranks below repo\n  // config, so routing the flag through it would silently lose to a repo that\n  // sets `worktree.baseBranch`.\n  const flagBase = options.baseBranch?.trim() || undefined;","sourceCodeStart":1846,"sourceCodeEnd":1882,"githubUrl":"https://github.com/coleam00/Archon/blob/0773b9745896ef0612e709c80845a0f7db315b19/packages/cli/src/commands/workflow.ts#L1846-L1882","documentation":"The workflow-start preflight rejects `--adopt` when any of `--resume`, `--branch`, `--from/--from-branch`, `--base`, or `--no-worktree` is also present. Adoption resolves its own worktree lane (it reuses the adopted run's worktree or cuts a fresh one from that run's branch), so worktree-lane flags have nothing to apply to.","triggerScenarios":"`archon workflow start <name> --adopt <runId>` combined with any of `--resume`, `--branch`, `--from`, `--base`, or `--no-worktree`.","commonSituations":"Templated scripts that append standard worktree flags to every invocation; trying to steer the adopted run's branch with `--branch` or `--base`.","solutions":["Remove the conflicting worktree-lane flag(s); adoption decides the lane itself.","If you need explicit control over branch/base, don't use `--adopt` — start a normal fresh run with those flags."],"exampleFix":"// before\narchon workflow start code-review --adopt run_123 --base main\n// after\narchon workflow start code-review --adopt run_123","handlingStrategy":"validation","validationCode":"const laneFlags = ['--resume','--branch','--from','--from-branch','--base','--no-worktree'];\nif (args.includes('--adopt') && args.some(a => laneFlags.includes(a))) {\n  throw new Error('--adopt resolves its own worktree lane; remove the conflicting flag.');\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Treat --adopt as a self-contained lane selector.","Only combine --adopt with flags unrelated to worktree/branch selection."],"tags":["cli","flag-conflict","adopt","worktree"],"backgroundTag":"mutually-exclusive-flags","analyzedSha":"0773b9745896ef0612e709c80845a0f7db315b19","analyzedAt":"2026-09-01T02:28:07.064Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}