coleam00/Archon · error · Error

--from/--from-branch has no effect with --no-worktree. Remov

Error message

--from/--from-branch has no effect with --no-worktree.
Remove --from or drop --no-worktree.

What it means

`--from`/`--from-branch` selects a source branch to materialize a worktree from; with `--no-worktree` the run happens directly in the current repo, so the flag has nothing to act on. The CLI throws rather than silently ignoring it.

Source

Thrown at packages/cli/src/commands/workflow.ts:1829

          ? `Dry-run failed; missing stubs: ${blockingMissingStubs.join(', ')}`
          : 'Dry-run failed. See the trace for details.'
      );
    }
    return;
  }

  // Validate mutually exclusive flags (defensive — cli.ts checks these for UX, but
  // workflowRunCommand is the authoritative boundary for programmatic callers)
  if (options.branchName !== undefined && options.noWorktree) {
    throw new Error(
      '--branch and --no-worktree are mutually exclusive.\n' +
        '  --branch creates an isolated worktree (safe).\n' +
        '  --no-worktree runs directly in your repo (no isolation).\n' +
        'Use one or the other.'
    );
  }
  if (options.noWorktree && options.fromBranch !== undefined) {
    throw new Error(
      '--from/--from-branch has no effect with --no-worktree.\n' +
        'Remove --from or drop --no-worktree.'
    );
  }
  if (options.noWorktree && options.baseBranch !== undefined) {
    throw new Error(
      '--base has no effect with --no-worktree.\n' + 'Remove --base or drop --no-worktree.'
    );
  }
  if (options.resume && options.branchName !== undefined) {
    throw new Error(
      '--resume and --branch are mutually exclusive.\n' +
        '  --resume reuses the existing worktree from the failed run.\n' +
        '  Remove --branch when using --resume.'
    );
  }
  if (options.resume && options.inputs !== undefined && options.inputs.length > 0) {
    throw new Error(

View on GitHub (pinned to 0773b97458)

Solutions

  1. Remove --from/--from-branch to run directly in the current repo
  2. Or drop --no-worktree so the worktree is created from the given branch

Example fix

// before
archon workflow run wf --no-worktree --from-branch main
// after
archon workflow run wf --from-branch main
Defensive patterns

Strategy: validation

Validate before calling

if (args.includes('--no-worktree') && (args.includes('--from') || args.includes('--from-branch'))) {
  throw new Error('--from/--from-branch has no effect with --no-worktree');
}

Try / catch

try {
  await runWorkflow(args);
} catch (e) {
  if (/has no effect with --no-worktree/.test(String(e.message))) {
    return runWorkflow(args.filter(a => a !== '--from' && !a.startsWith('--from-branch')));
  }
  throw e;
}

Prevention

When it happens

Trigger: `archon workflow run wf --no-worktree --from-branch main` (or --from), i.e. options.noWorktree set while options.fromBranch defined.

Common situations: Scripts that always pass --from-branch being reused in no-worktree mode; forgetting the flag is worktree-specific.

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


AI-assisted analysis of coleam00/Archon@0773b97458 (2026-09-01). Data as JSON: /api/errors/ee8aff06bcd2e287. Report an issue: GitHub.