{"record":{"id":"c8b152182f78bfd4","repo":"paperclipai/paperclip","slug":"source-and-target-paperclip-configs-are-the-same","errorCode":null,"errorMessage":"Source and target Paperclip configs are the same. Pass --from-config for the source instance.","messagePattern":"Source and target Paperclip configs are the same\\. Pass --from-config for the source instance\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"cli/src/commands/worktree.ts","lineNumber":1580,"sourceCode":"      return { seeded: false, reason: \"complete_marker\" };\n    }\n    if (!existsSync(markers.pending)) {\n      // Worktrees created before lazy seeding shipped were seeded eagerly and\n      // have neither marker. Preserve that compatibility without re-cloning.\n      return { seeded: false, reason: \"legacy_unmarked\" };\n    }\n\n    const pending = readWorktreeSeedPendingMarker(markers.pending);\n    const sourceConfigPath = opts.fromConfig || opts.fromDataDir || opts.fromInstance\n      ? resolveSourceConfigPath({\n          fromConfig: opts.fromConfig,\n          fromDataDir: opts.fromDataDir,\n          fromInstance: opts.fromInstance,\n        })\n      : path.resolve(pending.sourceConfigPath);\n\n    if (path.resolve(sourceConfigPath) === path.resolve(configPath)) {\n      throw new Error(\n        \"Source and target Paperclip configs are the same. Pass --from-config for the source instance.\",\n      );\n    }\n\n    const sourceConfig = readConfig(sourceConfigPath);\n    if (!sourceConfig) {\n      throw new Error(`Source config not found at ${sourceConfigPath}.`);\n    }\n    const targetConfig = readConfig(configPath);\n    if (!targetConfig) {\n      throw new Error(`Target config not found at ${configPath}.`);\n    }\n\n    const targetRoot = path.dirname(path.dirname(configPath));\n    const targetPaths = resolveWorktreeReseedTargetPaths({ configPath, rootPath: targetRoot });\n    const seedDatabase = dependencies.seedDatabase ?? seedWorktreeDatabase;\n    const details = await seedDatabase({\n      sourceConfigPath,","sourceCodeStart":1562,"sourceCodeEnd":1598,"githubUrl":"https://github.com/paperclipai/paperclip/blob/67001ec6eb96ae601aa27bc91d9b2415d665334a/cli/src/commands/worktree.ts#L1562-L1598","documentation":"Thrown by ensureWorktreeSeeded when the resolved source config path and the target config path are the same. Reseeding requires a distinct source instance to copy data from; seeding from the instance onto itself is a no-op at best and a data-corruption risk at worst, so it is rejected.","triggerScenarios":"Running reseed without --from-config while the pending marker's sourceConfigPath happens to equal the target config path; explicitly passing --from-config pointing at the same config as the target; resolving the source via the default which lands on the target.","commonSituations":"Pending marker written with source equal to target (bug or manual edit); user assumes reseed defaults to a different instance but it resolves to the same one; copy-paste of the target path into --from-config.","solutions":["Pass --from-config (or --from-data-dir/--from-instance) pointing at a DIFFERENT instance holding the seed data.","Inspect the pending marker's sourceConfigPath and correct it if it erroneously equals the target.","Re-run `paperclipai worktree init` with a valid source so the marker records a distinct source."],"exampleFix":"# before\npaperclipai worktree reseed --from-config ./worktree/.paperclip/config.json\n# after\npaperclipai worktree reseed --from-config ~/.paperclip/instances/default/config.json","handlingStrategy":"validation","validationCode":"function sourceDiffersFromTarget(sourceConfigPath: string, targetConfigPath: string): boolean {\n  return path.resolve(sourceConfigPath) !== path.resolve(targetConfigPath);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always pass --from-config pointing at a distinct instance.","Inspect the pending marker's sourceConfigPath before reseeding.","Re-run init with a correct source if the marker is wrong."],"tags":["worktree","reseed","seed","config","validation"],"backgroundTag":null,"analyzedSha":"67001ec6eb96ae601aa27bc91d9b2415d665334a","analyzedAt":"2026-08-12T12:05:45.408Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}