paperclipai/paperclip · error
Failed to prepare managed checkout for "${input.repoUrl}" at
Error message
Failed to prepare managed checkout for "${input.repoUrl}" at "${cwd}": ${reason}${authNote ? ` ${authNote}` : ""} What it means
Managed-checkout clone failure in heartbeat workspace materialization: cloning input.repoUrl into the staging directory (cloneTmpDir) failed for the given reason, with an authNote appended when credential-helper auth was involved. The staged temp clone is removed and the scrubbed error (credential text redacted) propagates — the managed checkout at cwd could not be prepared.
Source
Thrown at server/src/services/heartbeat.ts:1806
const mentionedSkillIds = extractMentionedSkillIdsFromSources([
issue.title,
issue.description ?? "",
...comments.map((comment) => comment.body),
]);
if (mentionedSkillIds.length === 0) return [];
const skillRows = await input.db
.select({
id: companySkillsTable.id,
key: companySkillsTable.key,
})
.from(companySkillsTable)
.where(
and(
eq(companySkillsTable.companyId, input.companyId),
inArray(companySkillsTable.id, mentionedSkillIds),
),
);
const skillKeyById = new Map(skillRows.map((row) => [row.id, row.key]));
return mentionedSkillIds
.map((skillId) => skillKeyById.get(skillId) ?? null)
.filter((skillKey): skillKey is string => Boolean(skillKey));
}
export function leaseReleaseStatusForRunStatus(
status: string | null | undefined,
): Extract<EnvironmentLeaseStatus, "released" | "expired" | "failed"> {
if (status === "cancelled") return "expired";
return status === "failed" || status === "timed_out" ? "failed" : "released";
}
export function providerResourceDispositionForTerminalRun(
desired: ProviderResourceDisposition | undefined,
status: string | null | undefined,
): ProviderResourceDisposition | undefined {
if (desired !== "keep_running") return desired;View on GitHub (pinned to 01ad858492)
Solutions
- Fix the reported checkout failure (repo URL, auth, disk space) and retry the run.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at server/src/services/heartbeat.ts:1664 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/15de9c1d8cf2106b.
Report an issue: GitHub.