{"record":{"id":"5f385a0fcc8b6ab2","repo":"paperclipai/paperclip","slug":"source-and-target-paperclip-configs-are-the-same-5f385a","errorCode":null,"errorMessage":"Source and target Paperclip configs are the same. Choose different --from/--to values.","messagePattern":"Source and target Paperclip configs are the same\\. Choose different --from/--to values\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"cli/src/commands/worktree.ts","lineNumber":4253,"sourceCode":"    return formatDatabaseBackupResult(result);\n  } finally {\n    if (targetHandle.startedByThisProcess) await targetHandle.stop();\n  }\n}\n\nasync function runWorktreeReseed(opts: WorktreeReseedOptions): Promise<void> {\n  const seedMode = opts.seedMode ?? \"full\";\n  if (!isWorktreeSeedMode(seedMode)) {\n    throw new Error(`Unsupported seed mode \"${seedMode}\". Expected one of: minimal, full.`);\n  }\n\n  const targetEndpoint = opts.to\n    ? resolveWorktreeEndpointFromSelector(opts.to, { allowCurrent: true })\n    : resolveCurrentWorktreeEndpoint();\n  const source = resolveWorktreeReseedSource(opts);\n\n  if (path.resolve(source.configPath) === path.resolve(targetEndpoint.configPath)) {\n    throw new Error(\"Source and target Paperclip configs are the same. Choose different --from/--to values.\");\n  }\n  if (!existsSync(source.configPath)) {\n    throw new Error(`Source config not found at ${source.configPath}.`);\n  }\n\n  const targetConfig = readConfig(targetEndpoint.configPath);\n  if (!targetConfig) {\n    throw new Error(`Target config not found at ${targetEndpoint.configPath}.`);\n  }\n  const sourceConfig = readConfig(source.configPath);\n  if (!sourceConfig) {\n    throw new Error(`Source config not found at ${source.configPath}.`);\n  }\n\n  const targetPaths = resolveWorktreeReseedTargetPaths({\n    configPath: targetEndpoint.configPath,\n    rootPath: targetEndpoint.rootPath,\n  });","sourceCodeStart":4235,"sourceCodeEnd":4271,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/cli/src/commands/worktree.ts#L4235-L4271","documentation":"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.","triggerScenarios":"Thrown at cli/src/commands/worktree.ts:3410 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Choose different --from/--to values pointing at distinct Paperclip instances."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"01ad8584922b5d85292b1723cae71fa0d9b07a19","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}