{"record":{"id":"1216de889eaffefc","repo":"paperclipai/paperclip","slug":"resolved-worktree-selector-does-not-look-like","errorCode":null,"errorMessage":"Resolved worktree \"${selector}\" does not look like a Paperclip worktree.","messagePattern":"Resolved worktree \"(.+?)\" does not look like a Paperclip worktree\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"cli/src/commands/worktree.ts","lineNumber":3680,"sourceCode":"      configPath,\n      label: path.basename(directPath),\n      isCurrent: false,\n    };\n  }\n\n  const matched = choices.find((choice) =>\n    (allowCurrent || !choice.isCurrent)\n    && (choice.worktree === directPath\n      || path.basename(choice.worktree) === trimmed\n      || choice.branchLabel === trimmed),\n  );\n  if (!matched) {\n    throw new Error(\n      `Could not resolve worktree \"${selector}\". Use a path, a listed worktree directory name, branch name, or \"current\".`,\n    );\n  }\n  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  }","sourceCodeStart":3662,"sourceCodeEnd":3698,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/cli/src/commands/worktree.ts#L3662-L3698","documentation":"Identity guard after fuzzy worktree matching: a listed git worktree matched the selector but contains no Paperclip config and is not the current checkout, so it is a plain git worktree that merge/reseed commands cannot operate on.","triggerScenarios":"Thrown at cli/src/commands/worktree.ts:2865 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Choose a worktree that has been initialized for Paperclip (contains .paperclip/config.json).","Initialize the worktree with `paperclipai worktree:init` first."],"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"}