paperclipai/paperclip · error · Error

Pass --from <worktree> or --from-config/--from-instance expl

Error message

Pass --from <worktree> or --from-config/--from-instance explicitly so the reseed source is unambiguous.

What it means

Thrown by resolveWorktreeReseedSource when neither a worktree selector (--from) nor any explicit config source (--from-config/--from-data-dir/--from-instance) is provided. The reseed operation cannot guess which instance to copy from, so it requires an explicit source.

Source

Thrown at cli/src/commands/worktree.ts:883

    return {
      configPath: endpoint.configPath,
      label: endpoint.label,
    };
  }

  if (hasExplicitConfigSource) {
    const configPath = resolveSourceConfigPath({
      fromConfig: fromConfig ?? undefined,
      fromDataDir: fromDataDir ?? undefined,
      fromInstance: fromInstance ?? undefined,
    });
    return {
      configPath,
      label: configPath,
    };
  }

  throw new Error(
    "Pass --from <worktree> or --from-config/--from-instance explicitly so the reseed source is unambiguous.",
  );
}

function resolveWorktreeRepairSource(input: WorktreeRepairOptions): ResolvedWorktreeReseedSource {
  const fromConfig = nonEmpty(input.fromConfig);
  const fromDataDir = nonEmpty(input.fromDataDir);
  const fromInstance = nonEmpty(input.fromInstance) ?? "default";
  const configPath = resolveSourceConfigPath({
    fromConfig: fromConfig ?? undefined,
    fromDataDir: fromDataDir ?? undefined,
    fromInstance,
  });
  return {
    configPath,
    label: configPath,
  };
}

View on GitHub (pinned to 67001ec6eb)

Solutions

  1. Pass `--from <worktree>` pointing at an existing worktree that has the source data.
  2. Or pass `--from-config <path>`, `--from-data-dir <home>`, or `--from-instance <id>` to name the source instance explicitly.
  3. If unsure of the source instance id, list instances under ~/.paperclip/instances to find one.

Example fix

# before
paperclipai worktree reseed
# after
paperclipai worktree reseed --from-instance default
Defensive patterns

Strategy: validation

Validate before calling

function requireSourceFlag(opts: { from?: string; fromConfig?: string; fromDataDir?: string; fromInstance?: string }): void {
  const any = nonEmpty(opts.from) || nonEmpty(opts.fromConfig) || nonEmpty(opts.fromDataDir) || nonEmpty(opts.fromInstance);
  if (!any) throw new Error('Pass --from or --from-config/--from-instance.');
}

Prevention

When it happens

Trigger: Running `paperclipai worktree reseed` (or the ensureWorktreeSeeded path) with no source flags and no resolvable default; the pending marker exists but its sourceConfigPath is empty/invalid and no override flags were passed.

Common situations: User expects the CLI to auto-detect the primary instance but did not configure a default; pending marker corrupted; first-time reseed without knowing which instance holds the seed data.

Related errors


AI-assisted analysis of paperclipai/paperclip@67001ec6eb (2026-08-12). Data as JSON: /api/errors/530d982274d1f16d. Report an issue: GitHub.