paperclipai/paperclip · error

Kubernetes file sync is only supported on the sandbox-cr bac

Error message

Kubernetes file sync is only supported on the sandbox-cr backend (lease backend: ${leaseBackend}).

What it means

Error "Kubernetes file sync is only supported on the sandbox-cr backend (lease backend: ${leaseBackend})." thrown in paperclipai/paperclip.

Source

Thrown at packages/plugins/sandbox-providers/kubernetes/src/plugin.ts:162

    | PluginEnvironmentSyncOutParams,
): Promise<{ exec: PodStreamExec; timeoutMs: number }> {
  const { lease } = params;
  if (!lease.providerLeaseId) {
    throw new Error("Kubernetes file sync requires a provider lease ID.");
  }

  const config = kubernetesProviderConfigSchema.parse(params.config);
  const namespace =
    typeof lease.metadata?.namespace === "string"
      ? lease.metadata.namespace
      : deriveTenantNamespace(config, params.companyId);

  const leaseBackend =
    typeof lease.metadata?.backend === "string"
      ? (lease.metadata.backend as "sandbox-cr" | "job")
      : config.backend;
  if (leaseBackend !== "sandbox-cr") {
    throw new Error(
      `Kubernetes file sync is only supported on the sandbox-cr backend (lease backend: ${leaseBackend}).`,
    );
  }

  const kc = createKubeConfig({
    inCluster: config.inCluster,
    kubeconfig: config.kubeconfig,
  });
  const clients = makeKubeClients(kc);
  const timeoutMs = config.podActivityDeadlineSec * 1000;

  // Ensure the Sandbox pod is Ready (wait only the first time for this lease),
  // then resolve the pod name — mirrors the onEnvironmentExecute resolution.
  if (!readySandboxesByLease.has(lease.providerLeaseId)) {
    await sandboxCrOrchestrator.waitForCompletion(clients, namespace, lease.providerLeaseId, {
      timeoutMs,
      pollMs: 2000,
    });

View on GitHub (pinned to 120ae5428f)

Solutions

  1. Use the sandbox-cr backend for file sync, or use a backend-specific sync path.

When it happens

Trigger: Thrown at packages/plugins/sandbox-providers/kubernetes/src/plugin.ts:162 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/c251cd7cbf3d508d. Report an issue: GitHub.