{"record":{"id":"fdc62240a9d8b1a4","repo":"paperclipai/paperclip","slug":"source-worktree-selection-cancelled","errorCode":null,"errorMessage":"Source worktree selection cancelled.","messagePattern":"Source worktree selection cancelled\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"cli/src/commands/worktree.ts","lineNumber":3704,"sourceCode":"  const excluded = excludeWorktreePath ? path.resolve(excludeWorktreePath) : null;\n  const currentEndpoint = resolveCurrentWorktreeEndpoint();\n  const choices = toMergeSourceChoices(process.cwd())\n    .filter((choice) => choice.hasPaperclipConfig || choice.isCurrent)\n    .filter((choice) => path.resolve(choice.worktree) !== excluded)\n    .map((choice) => ({\n      value: choice.isCurrent ? \"__current__\" : choice.worktree,\n      label: choice.branchLabel,\n      hint: `${choice.worktree}${choice.isCurrent ? \" (current)\" : \"\"}`,\n    }));\n  if (choices.length === 0) {\n    throw new Error(\"No Paperclip worktrees were found. Run `paperclipai worktree:list` to inspect the repo worktrees.\");\n  }\n  const selection = await p.select<string>({\n    message: \"Choose the source worktree to import from\",\n    options: choices,\n  });\n  if (p.isCancel(selection)) {\n    throw new Error(\"Source worktree selection cancelled.\");\n  }\n  if (selection === \"__current__\") {\n    return currentEndpoint;\n  }\n  return resolveWorktreeEndpointFromSelector(selection, { allowCurrent: true });\n}\n\nasync function applyMergePlan(input: {\n  sourceStorages: ConfiguredStorage[];\n  targetStorage: ConfiguredStorage;\n  targetDb: ClosableDb;\n  company: ResolvedMergeCompany;\n  plan: Awaited<ReturnType<typeof collectMergePlan>>[\"plan\"];\n}) {\n  const companyId = input.company.id;\n\n  return await input.targetDb.transaction(async (tx) => {\n    const importedProjectIds = input.plan.projectImports.map((project) => project.source.id);","sourceCodeStart":3686,"sourceCodeEnd":3722,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/cli/src/commands/worktree.ts#L3686-L3722","documentation":"User-abort sentinel in the interactive source-worktree picker: the operator cancelled the selection prompt, so the merge/reseed flow stops before touching either database.","triggerScenarios":"Thrown at cli/src/commands/worktree.ts:2889 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Re-run and select a source worktree, or pass the source non-interactively."],"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"}