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 worktrees.
What it means
Self-merge guard in worktree merge-history: the resolved --from and --to endpoints point at the same Paperclip config file, so source and target databases are identical and merging would be a no-op at best and a duplication bug at worst.
Solutions
- Choose different --from and --to worktrees so source and target configs differ.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at cli/src/commands/worktree.ts:3309 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/1f70b9127f865c27.
Report an issue: GitHub.
Appendix: source
Thrown at cli/src/commands/worktree.ts:4124
if (opts.apply && opts.dry) {
throw new Error("Use either --apply or --dry, not both.");
}
if (sourceArg && opts.from) {
throw new Error("Use either the positional source argument or --from, not both.");
}
const targetEndpoint = opts.to
? resolveWorktreeEndpointFromSelector(opts.to, { allowCurrent: true })
: resolveCurrentWorktreeEndpoint();
const sourceEndpoint = opts.from
? resolveWorktreeEndpointFromSelector(opts.from, { allowCurrent: true })
: sourceArg
? resolveWorktreeEndpointFromSelector(sourceArg, { allowCurrent: true })
: await promptForSourceEndpoint(targetEndpoint.rootPath);
if (path.resolve(sourceEndpoint.configPath) === path.resolve(targetEndpoint.configPath)) {
throw new Error("Source and target Paperclip configs are the same. Choose different --from/--to worktrees.");
}
const scopes = parseWorktreeMergeScopes(opts.scope);
const sourceHandle = await openConfiguredDb(sourceEndpoint.configPath);
const targetHandle = await openConfiguredDb(targetEndpoint.configPath);
const sourceStorages = resolveAttachmentLookupStorages({
sourceEndpoint,
targetEndpoint,
});
const targetStorage = openConfiguredStorage(targetEndpoint.configPath);
try {
const company = await resolveMergeCompany({
sourceDb: sourceHandle.db,
targetDb: targetHandle.db,
selector: opts.company,
});
let collected = await collectMergePlan({View on GitHub (pinned to 01ad858492)