{"record":{"id":"c251cd7cbf3d508d","repo":"paperclipai/paperclip","slug":"kubernetes-file-sync-is-only-supported-on-the-sand","errorCode":null,"errorMessage":"Kubernetes file sync is only supported on the sandbox-cr backend (lease backend: ${leaseBackend}).","messagePattern":"Kubernetes file sync is only supported on the sandbox-cr backend \\(lease backend: (.+?)\\)\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/plugins/sandbox-providers/kubernetes/src/plugin.ts","lineNumber":162,"sourceCode":"    | PluginEnvironmentSyncOutParams,\n): Promise<{ exec: PodStreamExec; timeoutMs: number }> {\n  const { lease } = params;\n  if (!lease.providerLeaseId) {\n    throw new Error(\"Kubernetes file sync requires a provider lease ID.\");\n  }\n\n  const config = kubernetesProviderConfigSchema.parse(params.config);\n  const namespace =\n    typeof lease.metadata?.namespace === \"string\"\n      ? lease.metadata.namespace\n      : deriveTenantNamespace(config, params.companyId);\n\n  const leaseBackend =\n    typeof lease.metadata?.backend === \"string\"\n      ? (lease.metadata.backend as \"sandbox-cr\" | \"job\")\n      : config.backend;\n  if (leaseBackend !== \"sandbox-cr\") {\n    throw new Error(\n      `Kubernetes file sync is only supported on the sandbox-cr backend (lease backend: ${leaseBackend}).`,\n    );\n  }\n\n  const kc = createKubeConfig({\n    inCluster: config.inCluster,\n    kubeconfig: config.kubeconfig,\n  });\n  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    });","sourceCodeStart":144,"sourceCodeEnd":180,"githubUrl":"https://github.com/paperclipai/paperclip/blob/120ae5428fa29bee300bcf806491cd4d965fbb7c/packages/plugins/sandbox-providers/kubernetes/src/plugin.ts#L144-L180","documentation":"Error \"Kubernetes file sync is only supported on the sandbox-cr backend (lease backend: ${leaseBackend}).\" thrown in paperclipai/paperclip.","triggerScenarios":"Thrown at packages/plugins/sandbox-providers/kubernetes/src/plugin.ts:162 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use the sandbox-cr backend for file sync, or use a backend-specific sync path."],"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-14T00:17:10.932Z"}