{"record":{"id":"5f3ea408c04728f9","repo":"coleam00/Archon","slug":"resume-and-branch-are-mutually-exclusive","errorCode":null,"errorMessage":"--resume and --branch are mutually exclusive.\n  --resume reuses the existing worktree from the failed run.\n  Remove --branch when using --resume.","messagePattern":"--resume and --branch are mutually exclusive\\.\n  --resume reuses the existing worktree from the failed run\\.\n  Remove --branch when using --resume\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/cli/src/commands/workflow.ts","lineNumber":1840,"sourceCode":"      '--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\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');","sourceCodeStart":1822,"sourceCodeEnd":1858,"githubUrl":"https://github.com/coleam00/Archon/blob/0773b9745896ef0612e709c80845a0f7db315b19/packages/cli/src/commands/workflow.ts#L1822-L1858","documentation":"The workflow-start preflight rejects `--resume` together with `--branch`. Resuming reuses the worktree and branch from the original failed run, so a caller-supplied branch name has no lane to apply to and would be silently dropped. The CLI surfaces the conflict with an explicit remedy instead.","triggerScenarios":"`archon workflow start <name> --resume --branch <name>` — any resume invocation where options.branchName is also set.","commonSituations":"Retrying a failed run via `--resume` while copy-pasting a `--branch` flag from the original fresh-run command line; scripts that always pass `--branch`.","solutions":["Drop `--branch` from the resume command; the original run's worktree and branch are reused automatically.","If you truly want a new branch, drop `--resume` and start a fresh run with `--branch <name>` instead."],"exampleFix":"// before\narchon workflow start code-review --resume --branch fix/thing\n// after\narchon workflow start code-review --resume","handlingStrategy":"validation","validationCode":"if (args.includes('--resume') && args.includes('--branch')) {\n  throw new Error('--branch is implied by --resume; remove --branch.');\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use --resume bare; never append lane flags to a resume command.","If a shared launcher adds --branch, gate it on absence of --resume."],"tags":["cli","flag-conflict","resume","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"}