{"record":{"id":"6d259d6f07b2e9e2","repo":"coleam00/Archon","slug":"supersedes-records-a-fresh-lane-rerun-as-replaci","errorCode":null,"errorMessage":"--supersedes records a FRESH-lane rerun as replacing a prior open item; it cannot be combined with --resume.","messagePattern":"--supersedes records a FRESH-lane rerun as replacing a prior open item; it cannot be combined with --resume\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/cli/src/commands/workflow.ts","lineNumber":1870,"sourceCode":"  }\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;\n\n  // Reconcile workflow-level worktree policy with invocation flags.\n  // The workflow YAML's `worktree.enabled` pins isolation regardless of caller —\n  // a mismatch between policy and flags is a user error we surface loudly\n  // rather than silently applying one side and ignoring the other.\n  const pinnedEnabled = workflow.worktree?.enabled;","sourceCodeStart":1852,"sourceCodeEnd":1888,"githubUrl":"https://github.com/coleam00/Archon/blob/0773b9745896ef0612e709c80845a0f7db315b19/packages/cli/src/commands/workflow.ts#L1852-L1888","documentation":"The workflow-start preflight rejects `--supersedes` together with `--resume`. Superseding marks a fresh-lane rerun as replacing a prior open item, while resume replays the prior run in its original lane — the two replacement semantics are incompatible, so the combination is refused.","triggerScenarios":"`archon workflow start <name> --supersedes <runId> --resume` — any invocation where supersedesRunId and resume are both set.","commonSituations":"Trying to both supersede a failed run and continue it in place; conflating 'replace this run' with 'resume this run'.","solutions":["Drop `--resume` and issue a fresh-lane rerun with `--supersedes <runId>`.","Drop `--supersedes` if you only want to resume the original run without recording a replacement."],"exampleFix":"// before\narchon workflow start code-review --supersedes run_123 --resume\n// after\narchon workflow start code-review --supersedes run_123","handlingStrategy":"validation","validationCode":"if (args.includes('--supersedes') && args.includes('--resume')) {\n  throw new Error('--supersedes requires a fresh-lane rerun; drop --resume.');\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Remember the semantic split: supersedes = fresh replacement, resume = same-lane continuation.","Never build retry wrappers that mix the two."],"tags":["cli","flag-conflict","resume","supersedes"],"backgroundTag":"mutually-exclusive-flags","analyzedSha":"0773b9745896ef0612e709c80845a0f7db315b19","analyzedAt":"2026-09-01T02:28:07.064Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}