paperclipai/paperclip · error · Error

Source and target Paperclip configs are the same. Choose…

Error message

Source and target Paperclip configs are the same. Choose different --from/--to values.

What it means

Self-reseed guard in worktree reseed: the resolved source and target endpoints share one config path, so the reseed would read from and overwrite the same instance; distinct --from/--to values are required.

Solutions

  1. Choose different --from/--to values pointing at distinct Paperclip instances.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at cli/src/commands/worktree.ts:3410 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of paperclipai/paperclip@01ad858492 (2026-08-18). Data as JSON: /api/errors/5f385a0fcc8b6ab2. Report an issue: GitHub.

Appendix: source

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

    return formatDatabaseBackupResult(result);
  } finally {
    if (targetHandle.startedByThisProcess) await targetHandle.stop();
  }
}

async function runWorktreeReseed(opts: WorktreeReseedOptions): Promise<void> {
  const seedMode = opts.seedMode ?? "full";
  if (!isWorktreeSeedMode(seedMode)) {
    throw new Error(`Unsupported seed mode "${seedMode}". Expected one of: minimal, full.`);
  }

  const targetEndpoint = opts.to
    ? resolveWorktreeEndpointFromSelector(opts.to, { allowCurrent: true })
    : resolveCurrentWorktreeEndpoint();
  const source = resolveWorktreeReseedSource(opts);

  if (path.resolve(source.configPath) === path.resolve(targetEndpoint.configPath)) {
    throw new Error("Source and target Paperclip configs are the same. Choose different --from/--to values.");
  }
  if (!existsSync(source.configPath)) {
    throw new Error(`Source config not found at ${source.configPath}.`);
  }

  const targetConfig = readConfig(targetEndpoint.configPath);
  if (!targetConfig) {
    throw new Error(`Target config not found at ${targetEndpoint.configPath}.`);
  }
  const sourceConfig = readConfig(source.configPath);
  if (!sourceConfig) {
    throw new Error(`Source config not found at ${source.configPath}.`);
  }

  const targetPaths = resolveWorktreeReseedTargetPaths({
    configPath: targetEndpoint.configPath,
    rootPath: targetEndpoint.rootPath,
  });

View on GitHub (pinned to 01ad858492)