coleam00/Archon · error · Error
--resume and --model are mutually exclusive. A resumed run k
Error message
--resume and --model are mutually exclusive. A resumed run keeps its original model bindings.
What it means
The CLI refuses to combine `--resume` with `--model`: a continued run inherits the model assignments recorded at its original start, and re-binding models mid-resume is unsupported. This is a hard argument-conflict check on the programmatic boundary (`workflowRunCommand`).
Source
Thrown at packages/cli/src/commands/workflow.ts:1671
// id crossed between two concurrent detached launches, and the narrow window where the
// child's re-capture resolves a different workflow than the parent did.
if (detachedPreCreatedRun && detachedPreCreatedRun.workflow_name !== workflow.name) {
throw new Error(
`Cannot execute run '${detachedPreCreatedRun.id}': it belongs to workflow ` +
`'${detachedPreCreatedRun.workflow_name}', not '${workflow.name}'.`
);
}
// Keys this workflow's YAML declares that the engine drops (#2213). Written to
// stderr, never stdout: in --json mode Pino is silenced and stdout must stay
// exactly the machine-readable payload, so this is the ONLY channel that
// reaches an agent driving runs through `--json`. Not gated on --quiet — a
// dropped key can be a gate the author believes is protecting the run.
emitParseWarnings(workflowEntry?.parseWarnings, workflow.name);
emitDeprecationNotice(workflow);
if (isContinuation && options.modelAssignments && options.modelAssignments.length > 0) {
throw new Error(
'--resume and --model are mutually exclusive. A resumed run keeps its original model bindings.'
);
}
const dryRunOnlyOptions = [
['--stubs', options.stubsPath !== undefined],
['--stubs-init', options.stubsInitPath !== undefined],
['--default-stubs', options.defaultStubs === true],
['--exec-code', options.execCode === true],
['--pause-at-gates', options.pauseAtGates === true],
] as const;
const optionWithoutDryRun = dryRunOnlyOptions.find(([, present]) => present)?.[0];
if (!options.dryRun && optionWithoutDryRun) {
throw new Error(`${optionWithoutDryRun} requires --dry-run.`);
}
if (options.dryRun) {
const incompatible = [View on GitHub (pinned to 0773b97458)
Solutions
- Drop the --model flags and re-run with --resume only; the run keeps its original model bindings
- If a different model is genuinely needed, start a NEW run with --model instead of resuming
Example fix
// before archon workflow run wf --resume run-123 --model agent=opus // after archon workflow run wf --resume run-123
Defensive patterns
Strategy: validation
Validate before calling
if (isResume && modelFlags.length > 0) {
throw new Error('--resume and --model are mutually exclusive');
} Try / catch
try {
await runWorkflow(args);
} catch (e) {
if (/mutually exclusive/.test(String(e.message))) {
args = args.filter(a => !a.startsWith('--model'));
return runWorkflow(args);
}
throw e;
} Prevention
- Build resume invocations without any --model flags
- Don't blanket-append --model in generic wrapper scripts
- Start a new run if model rebinding is truly needed
When it happens
Trigger: `archon workflow run <wf> --resume <run> --model node=model` or calling workflowRunCommand with both isContinuation and non-empty options.modelAssignments.
Common situations: Wanting to change models when resuming after a failure; a script that appends `--model` flags unconditionally and is then reused for a resume.
Understand the failure class
Background: "mutually exclusive" flag errors: what "can't supply both nx and xx", "--raw is not compatible with -i" and "cannot be used with" mean, and how to fix them — this error's family across 29 libraries.
Related errors
- --dry-run cannot be combined with ${incompatibleFlag}.
- --stubs-init cannot be combined with --stubs.
- --stubs-init cannot be combined with --default-stubs.
- --branch and --no-worktree are mutually exclusive. --branc
- --from/--from-branch has no effect with --no-worktree. Remov
AI-assisted analysis of coleam00/Archon@0773b97458 (2026-09-01).
Data as JSON: /api/errors/04a5af0638e9d29e.
Report an issue: GitHub.