{"record":{"id":"15de9c1d8cf2106b","repo":"paperclipai/paperclip","slug":"failed-to-prepare-managed-checkout-for-input-re","errorCode":null,"errorMessage":"Failed to prepare managed checkout for \"${input.repoUrl}\" at \"${cwd}\": ${reason}${authNote ? ` ${authNote}` : \"\"}","messagePattern":"Failed to prepare managed checkout for \"(.+?)\" at \"(.+?)\": (.+?)(.+?)` : \"\"\\}","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/src/services/heartbeat.ts","lineNumber":1806,"sourceCode":"  const mentionedSkillIds = extractMentionedSkillIdsFromSources([\n    issue.title,\n    issue.description ?? \"\",\n    ...comments.map((comment) => comment.body),\n  ]);\n  if (mentionedSkillIds.length === 0) return [];\n\n  const skillRows = await input.db\n    .select({\n      id: companySkillsTable.id,\n      key: companySkillsTable.key,\n    })\n    .from(companySkillsTable)\n    .where(\n      and(\n        eq(companySkillsTable.companyId, input.companyId),\n        inArray(companySkillsTable.id, mentionedSkillIds),\n      ),\n    );\n  const skillKeyById = new Map(skillRows.map((row) => [row.id, row.key]));\n  return mentionedSkillIds\n    .map((skillId) => skillKeyById.get(skillId) ?? null)\n    .filter((skillKey): skillKey is string => Boolean(skillKey));\n}\n\nexport function leaseReleaseStatusForRunStatus(\n  status: string | null | undefined,\n): Extract<EnvironmentLeaseStatus, \"released\" | \"expired\" | \"failed\"> {\n  if (status === \"cancelled\") return \"expired\";\n  return status === \"failed\" || status === \"timed_out\" ? \"failed\" : \"released\";\n}\n\nexport function providerResourceDispositionForTerminalRun(\n  desired: ProviderResourceDisposition | undefined,\n  status: string | null | undefined,\n): ProviderResourceDisposition | undefined {\n  if (desired !== \"keep_running\") return desired;","sourceCodeStart":1788,"sourceCodeEnd":1824,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/server/src/services/heartbeat.ts#L1788-L1824","documentation":"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.","triggerScenarios":"Thrown at server/src/services/heartbeat.ts:1664 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the reported checkout failure (repo URL, auth, disk space) and retry the run."],"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-14T05:17:10.506Z"}