{"record":{"id":"1b49d5e841d0561c","repo":"paperclipai/paperclip","slug":"failed-to-integrate-concurrent-remote-git-history","errorCode":null,"errorMessage":"Failed to integrate concurrent remote git history for ${input.importedHead.slice(0, 12)} after multiple retries.","messagePattern":"Failed to integrate concurrent remote git history for (.+?) after multiple retries\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/adapter-utils/src/git-workspace-sync.ts","lineNumber":662,"sourceCode":"    maxBuffer: 1024 * 1024,\n  });\n  const importedHead = await runLocalGit(input.localDir, [\"rev-parse\", input.importedRef], {\n    timeout: 10_000,\n    maxBuffer: 16 * 1024,\n  });\n  return importedHead.stdout.trim();\n}\n\n/** Substrings git emits when a bundle names a prerequisite the importer lacks. */\nconst GIT_MISSING_PREREQUISITE_MARKERS = [\n  \"did not send all necessary objects\",\n  \"lacks these prerequisite commits\",\n  \"revision walk setup failed\",\n];\n\n/**\n * True when a bundle import failed because the host repository does not hold a\n * commit the (delta) bundle assumes as a prerequisite. Such a failure is\n * recoverable by re-exporting a full, self-contained bundle from the still-live\n * sandbox rather than discarding the run.\n */\nexport function isMissingGitPrerequisiteError(error: unknown): boolean {\n  const message = error instanceof Error ? error.message : String(error);\n  return GIT_MISSING_PREREQUISITE_MARKERS.some((marker) => message.includes(marker));\n}\n\nexport function buildRemoteGitDeltaBundleScript(input: {\n  remoteDir: string;\n  baseSha: string;\n  exportRef: string;\n  bundlePath: string;\n  statusPath?: string;\n  catBundle?: boolean;\n  cleanupBundle?: boolean;\n  /**\n   * Skip the delta boundary entirely and always emit a full, self-contained","sourceCodeStart":644,"sourceCodeEnd":680,"githubUrl":"https://github.com/paperclipai/paperclip/blob/3f1d897a7c018d76563a21c6e39c3c9b03933622/packages/adapter-utils/src/git-workspace-sync.ts#L644-L680","documentation":"The git update-ref to integrate the imported history kept hitting concurrent-ref-update errors and the retry budget (several attempts) was exhausted; the remote history could not be integrated.","triggerScenarios":"Thrown at packages/adapter-utils/src/git-workspace-sync.ts:598 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry later; concurrent history integration exhausted retries.","Serialize workspace restores so only one runs at a time."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3f1d897a7c018d76563a21c6e39c3c9b03933622","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}