{"record":{"id":"e043c70e88acede9","repo":"paperclipai/paperclip","slug":"preparesandboxmanagedruntime-requires-a-client-tha","errorCode":null,"errorMessage":"prepareSandboxManagedRuntime requires a client that exposes syncIn (createCommandManagedRuntimeClient provides a native-or-fallback implementation).","messagePattern":"prepareSandboxManagedRuntime requires a client that exposes syncIn \\(createCommandManagedRuntimeClient provides a native-or-fallback implementation\\)\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/adapter-utils/src/sandbox-managed-runtime.ts","lineNumber":914,"sourceCode":"  await fs.rm(stagedTargetPath, { recursive: true, force: true }).catch(() => undefined);\n  try {\n    await fs.copyFile(sourcePath, stagedTargetPath, fsConstants.COPYFILE_FICLONE).catch(async () => {\n      await fs.copyFile(sourcePath, stagedTargetPath);\n    });\n    await fs.chmod(stagedTargetPath, stats.mode);\n    await fs.rename(stagedTargetPath, targetPath);\n  } finally {\n    await fs.rm(stagedTargetPath, { recursive: true, force: true }).catch(() => undefined);\n  }\n}\n\nexport async function mirrorDirectory(\n  sourceDir: string,\n  targetDir: string,\n  options: { preserveAbsent?: string[] } = {},\n): Promise<void> {\n  await fs.mkdir(targetDir, { recursive: true });\n  const preserveAbsent = new Set(options.preserveAbsent ?? []);\n  const shouldPreserveAbsent = (relative: string) =>\n    [...preserveAbsent].some((candidate) => isRelativePathOrDescendant(relative, candidate));\n\n  const sourceEntries = new Set(await walkDirectory(sourceDir));\n  const targetEntries = await walkDirectory(targetDir);\n  for (const relative of targetEntries) {\n    if (shouldPreserveAbsent(relative)) continue;\n    if (!sourceEntries.has(relative)) {\n      await fs.rm(path.join(targetDir, relative), { recursive: true, force: true }).catch(() => undefined);\n    }\n  }\n\n  const entries = (await walkDirectory(sourceDir)).sort((left, right) => left.localeCompare(right));\n  for (const relative of entries) {\n    await copyWorkspaceEntry(sourceDir, targetDir, relative);\n  }\n}\n","sourceCodeStart":896,"sourceCodeEnd":932,"githubUrl":"https://github.com/paperclipai/paperclip/blob/3f1d897a7c018d76563a21c6e39c3c9b03933622/packages/adapter-utils/src/sandbox-managed-runtime.ts#L896-L932","documentation":"Interface contract guard in sandbox runtime preparation: the supplied runtime client lacks a syncIn implementation, but the orchestrator delegates all inbound staging to client.syncIn (always provided by createCommandManagedRuntimeClient); this fires only when a custom/partial client was injected, e.g. in tests via makeFsClient.","triggerScenarios":"Thrown at packages/adapter-utils/src/sandbox-managed-runtime.ts:770 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use createCommandManagedRuntimeClient (native or fallback) which exposes syncIn."],"exampleFix":null,"handlingStrategy":"validation","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"}