{"record":{"id":"bdc16073a125d2ad","repo":"paperclipai/paperclip","slug":"no-paperclip-worktrees-were-found-run-paperclipa","errorCode":null,"errorMessage":"No Paperclip worktrees were found. Run `paperclipai worktree:list` to inspect the repo worktrees.","messagePattern":"No Paperclip worktrees were found\\. Run `paperclipai worktree:list` to inspect the repo worktrees\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"cli/src/commands/worktree.ts","lineNumber":3697,"sourceCode":"  if (!matched.hasPaperclipConfig && !matched.isCurrent) {\n    throw new Error(`Resolved worktree \"${selector}\" does not look like a Paperclip worktree.`);\n  }\n  return resolveEndpointFromChoice(matched);\n}\n\nasync function promptForSourceEndpoint(excludeWorktreePath?: string): Promise<ResolvedWorktreeEndpoint> {\n  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;","sourceCodeStart":3679,"sourceCodeEnd":3715,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/cli/src/commands/worktree.ts#L3679-L3715","documentation":"Empty-state sentinel when prompting for a source worktree: git worktree discovery in the current repo found no Paperclip-configured worktrees (all candidates were excluded), so there is nothing to pick as a merge source.","triggerScenarios":"Thrown at cli/src/commands/worktree.ts:2882 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide a non-empty worktree selector (path, directory name, branch name, or \"current\")."],"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"}