{"record":{"id":"c6bbe58b31a0a300","repo":"paperclipai/paperclip","slug":"kubernetes-file-sync-could-not-resolve-the-sandbox","errorCode":null,"errorMessage":"Kubernetes file sync could not resolve the Sandbox pod name.","messagePattern":"Kubernetes file sync could not resolve the Sandbox pod name\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/plugins/sandbox-providers/kubernetes/src/plugin.ts","lineNumber":189,"sourceCode":"  const clients = makeKubeClients(kc);\n  const timeoutMs = config.podActivityDeadlineSec * 1000;\n\n  // Ensure the Sandbox pod is Ready (wait only the first time for this lease),\n  // then resolve the pod name — mirrors the onEnvironmentExecute resolution.\n  if (!readySandboxesByLease.has(lease.providerLeaseId)) {\n    await sandboxCrOrchestrator.waitForCompletion(clients, namespace, lease.providerLeaseId, {\n      timeoutMs,\n      pollMs: 2000,\n    });\n    readySandboxesByLease.add(lease.providerLeaseId);\n  }\n\n  const podName =\n    typeof lease.metadata?.podName === \"string\" && lease.metadata.podName\n      ? lease.metadata.podName\n      : await sandboxCrOrchestrator.findPod(clients, namespace, lease.providerLeaseId);\n  if (!podName) {\n    throw new Error(\"Kubernetes file sync could not resolve the Sandbox pod name.\");\n  }\n\n  // Bind the streaming exec: raw tar bytes move over stdin/stdout straight to and\n  // from a host file, so neither side buffers the whole payload. The file-sync\n  // module bounds the untrusted pod's stdout with its own streamed-bytes disk\n  // guard and passes the stderr cap through `io`.\n  const exec: PodStreamExec = (command, io) =>\n    execInPodStreaming(kc, namespace, podName, \"agent\", command, {\n      ...io,\n      timeoutMs: io.timeoutMs ?? timeoutMs,\n    });\n  return { exec, timeoutMs };\n}\n\nconst plugin = definePlugin({\n  async setup(ctx) {\n    ctx.logger.info(\"Kubernetes sandbox provider plugin ready\");\n  },","sourceCodeStart":171,"sourceCodeEnd":207,"githubUrl":"https://github.com/paperclipai/paperclip/blob/120ae5428fa29bee300bcf806491cd4d965fbb7c/packages/plugins/sandbox-providers/kubernetes/src/plugin.ts#L171-L207","documentation":"Error \"Kubernetes file sync could not resolve the Sandbox pod name.\" thrown in paperclipai/paperclip.","triggerScenarios":"Thrown at packages/plugins/sandbox-providers/kubernetes/src/plugin.ts:189 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the Sandbox CR created its pod; check CR status and controller logs."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"120ae5428fa29bee300bcf806491cd4d965fbb7c","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}