{"record":{"id":"19106b44f657f9dd","repo":"paperclipai/paperclip","slug":"workspace-durable-seed-root-invalid","errorCode":"workspace_durable_seed_root_invalid","errorMessage":"workspace_durable_seed_root_invalid","messagePattern":"workspace_durable_seed_root_invalid","errorType":"error_code","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/adapter-utils/src/sandbox-managed-runtime.ts","lineNumber":787,"sourceCode":"  }\n  if (\n    input.expectedSha256 &&\n    (await sha256File(input.sourcePath)) !== input.expectedSha256\n  ) {\n    throw new Error(\"workspace_durable_seed_digest_mismatch\");\n  }\n  await fs.copyFile(input.sourcePath, input.targetPath);\n}\n\nasync function persistDurableSeedArchive(input: {\n  sourcePath: string;\n  targetPath: string;\n}): Promise<void> {\n  const parent = path.dirname(input.targetPath);\n  await fs.mkdir(parent, { recursive: true, mode: 0o700 });\n  const parentStat = await fs.lstat(parent);\n  if (parentStat.isSymbolicLink() || !parentStat.isDirectory()) {\n    throw new Error(\"workspace_durable_seed_root_invalid\");\n  }\n  const temporary = path.join(\n    parent,\n    `.${path.basename(input.targetPath)}.${randomUUID()}.tmp`,\n  );\n  try {\n    await fs.copyFile(input.sourcePath, temporary);\n    await fs.chmod(temporary, 0o600);\n    await fs.rename(temporary, input.targetPath);\n  } finally {\n    await fs.rm(temporary, { force: true }).catch(() => undefined);\n  }\n}\n\nasync function execTar(args: string[]): Promise<void> {\n  await execFile(\"tar\", args, {\n    env: {\n      ...process.env,","sourceCodeStart":769,"sourceCodeEnd":805,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/packages/adapter-utils/src/sandbox-managed-runtime.ts#L769-L805","documentation":"Guard in persistDurableSeedArchive: after mkdir of the target's parent directory, an lstat shows the parent is a symlink or not a directory. The durable seed storage root fails the runtime's safety checks — typically because a symlink was planted at the parent path or something replaced the directory between creation and verification.","triggerScenarios":"Thrown at packages/adapter-utils/src/sandbox-managed-runtime.ts:787 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove the offending symlink or non-directory at the parent path and retry the prepare","Check the runtime root (under the workspace remote dir) for leftover artifacts from a prior failed run","Ensure no external process is mutating .paperclip-runtime storage while the sandbox prepares"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"01ad8584922b5d85292b1723cae71fa0d9b07a19","analyzedAt":"2026-09-10T03:14:50.855Z","contentChangedAt":"2026-09-10T03:14:50.855Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}