paperclipai/paperclip · error · Error

Failed to integrate concurrent SSH git history for

Error message

Failed to integrate concurrent SSH git history for ${input.importedHead.slice(0, 12)} after multiple retries.

What it means

Error "Failed to integrate concurrent SSH git history for ${input.importedHead.slice(0, 12)} after multiple retries." thrown in paperclipai/paperclip.

Solutions

  1. Retry later; integration exhausted retries.
  2. Serialize concurrent SSH workspace restores.

When it happens

Trigger: Thrown at packages/adapter-utils/src/ssh.ts:1038 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of paperclipai/paperclip@120ae5428f (2026-08-18). Data as JSON: /api/errors/957b345ff901585f. Report an issue: GitHub.

Appendix: source

Thrown at packages/adapter-utils/src/ssh.ts:1038

      ],
      {
        timeout: 60_000,
        maxBuffer: 64 * 1024,
      },
    );
    try {
      await runLocalGit(input.localDir, ["update-ref", headRef, mergeCommit.stdout.trim(), currentHead], {
        timeout: 10_000,
        maxBuffer: 16 * 1024,
      });
      return;
    } catch (error) {
      if (isConcurrentRefUpdateError(error) && attempt < 4) continue;
      throw error;
    }
  }

  throw new Error(`Failed to integrate concurrent SSH git history for ${input.importedHead.slice(0, 12)} after multiple retries.`);
}

async function clearRemoteDirectory(input: {
  spec: SshConnectionConfig;
  remoteDir: string;
  preserveEntries?: string[];
}): Promise<void> {
  const preservePatterns = (input.preserveEntries ?? [])
    .map((entry) => `! -name ${shellQuote(entry)}`)
    .join(" ");
  const script = [
    "set -e",
    `mkdir -p ${shellQuote(input.remoteDir)}`,
    `find ${shellQuote(input.remoteDir)} -mindepth 1 -maxdepth 1 ${preservePatterns} -exec rm -rf -- {} +`,
  ].join("\n");
  await runSshScript(input.spec, script, {
    timeoutMs: 30_000,
    maxBuffer: 256 * 1024,

View on GitHub (pinned to 120ae5428f)