paperclipai/paperclip · error · Error
Resolved worktree " " does not look like a Paperclip…
Error message
Resolved worktree "${selector}" does not look like a Paperclip worktree. What it means
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.
Solutions
- Choose a worktree that has been initialized for Paperclip (contains .paperclip/config.json).
- Initialize the worktree with `paperclipai worktree:init` first.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at cli/src/commands/worktree.ts:2865 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of paperclipai/paperclip@01ad858492 (2026-08-18).
Data as JSON: /api/errors/1216de889eaffefc.
Report an issue: GitHub.
Appendix: source
Thrown at cli/src/commands/worktree.ts:3680
configPath,
label: path.basename(directPath),
isCurrent: false,
};
}
const matched = choices.find((choice) =>
(allowCurrent || !choice.isCurrent)
&& (choice.worktree === directPath
|| path.basename(choice.worktree) === trimmed
|| choice.branchLabel === trimmed),
);
if (!matched) {
throw new Error(
`Could not resolve worktree "${selector}". Use a path, a listed worktree directory name, branch name, or "current".`,
);
}
if (!matched.hasPaperclipConfig && !matched.isCurrent) {
throw new Error(`Resolved worktree "${selector}" does not look like a Paperclip worktree.`);
}
return resolveEndpointFromChoice(matched);
}
async function promptForSourceEndpoint(excludeWorktreePath?: string): Promise<ResolvedWorktreeEndpoint> {
const excluded = excludeWorktreePath ? path.resolve(excludeWorktreePath) : null;
const currentEndpoint = resolveCurrentWorktreeEndpoint();
const choices = toMergeSourceChoices(process.cwd())
.filter((choice) => choice.hasPaperclipConfig || choice.isCurrent)
.filter((choice) => path.resolve(choice.worktree) !== excluded)
.map((choice) => ({
value: choice.isCurrent ? "__current__" : choice.worktree,
label: choice.branchLabel,
hint: `${choice.worktree}${choice.isCurrent ? " (current)" : ""}`,
}));
if (choices.length === 0) {
throw new Error("No Paperclip worktrees were found. Run `paperclipai worktree:list` to inspect the repo worktrees.");
}View on GitHub (pinned to 01ad858492)