paperclipai/paperclip · info · Error
Project mapping cancelled.
Error message
Project mapping cancelled.
What it means
Thrown by promptForProjectMappings when the user cancels the @clack/prompts select prompt for a missing source project mapping. During merge planning, source issues may reference projects absent in the target; the CLI prompts per-project to Import, Map, or Leave unset. Pressing escape/Ctrl-C (p.isCancel) aborts the entire merge flow with this message. It is a user-initiated cancellation, not a system fault.
Source
Thrown at cli/src/commands/worktree.ts:2777
},
...(nameMatch
? [{
value: nameMatch.id,
label: `Map to ${nameMatch.name}`,
hint: "Recommended: exact name match",
}]
: []),
{
value: null,
label: "Leave unset",
hint: "Keep imported issues without a project",
},
...targetChoices.filter((choice) => choice.value !== nameMatch?.id),
],
initialValue: nameMatch?.id ?? null,
});
if (p.isCancel(selection)) {
throw new Error("Project mapping cancelled.");
}
if (selection === importSelectionValue) {
importProjectIds.add(sourceProjectId);
continue;
}
mappings[sourceProjectId] = selection;
}
return {
importProjectIds: [...importProjectIds],
projectIdOverrides: mappings,
};
}
export async function worktreeListCommand(opts: WorktreeListOptions): Promise<void> {
const choices = toMergeSourceChoices(process.cwd());
if (opts.json) {
console.log(JSON.stringify(choices, null, 2));View on GitHub (pinned to 67001ec6eb)
Solutions
- Re-run merge-history and complete the prompts, choosing Import / Map / Leave unset for each missing project.
- If you want to avoid prompts, pre-create the projects in the target or pass flags that pre-supply mappings if available.
- Run in an interactive TTY so the prompt is answerable.
Example fix
// before: user cancels the project-mapping select prompt // after (complete the prompt) paperclipai worktree:merge-history # choose Import/Map/Leave for each project
Defensive patterns
Strategy: try-catch
Try / catch
try { await promptForProjectMappings(input); }
catch (err) {
if (/Project mapping cancelled/.test(String((err as Error).message))) {
// treat as non-fatal: abort merge gracefully, no rollback needed
return;
} else throw err;
} Prevention
- Pre-create source projects in the target to skip prompts.
- Run merge-history in an interactive TTY so prompts are answerable.
- Treat cancellation as a clean abort, not an error to suppress silently.
When it happens
Trigger: User hits Esc or Ctrl-C at the 'Project X is missing in target' select prompt; non-interactive shell where @clack detects cancel; user intentionally bails out of mapping.
Common situations: Decided not to proceed mid-flow; realised the target needs setup first; accidentally cancelled.
Related errors
- Database for ${configPath} is not up to date.${pending} Run
- Could not resolve company "${selector}" in both source and t
- Source and target databases do not share a company id. Pass
- Multiple shared companies found. Re-run with --company <id-o
- Target company ${companyId} was not found.
AI-assisted analysis of paperclipai/paperclip@67001ec6eb (2026-08-12).
Data as JSON: /api/errors/2060b8ca5860d224.
Report an issue: GitHub.