paperclipai/paperclip · error

Kubernetes file sync requires a workspace remote dir on the

Error message

Kubernetes file sync requires a workspace remote dir on the lease metadata.

What it means

Error "Kubernetes file sync requires a workspace remote dir on the lease metadata." thrown in paperclipai/paperclip.

Source

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

// How long onEnvironmentResumeLease waits for an existing Sandbox pod to
// report Ready before declaring the lease non-resumable. Deliberately short:
// this is a liveness check on an already-provisioned pod, not a fresh
// provision — if the pod isn't (almost) up, falling back to acquireLease is
// faster and more reliable than waiting.
const RESUME_READY_TIMEOUT_MS = 30_000;
const RESUME_READY_POLL_MS = 1_000;

// The workspace remote dir is the confinement root for native file sync. It is
// recorded on the lease metadata at realizeWorkspace time (`remoteCwd`); require
// it so a sync can never run without a concrete root to confine every sandbox
// path against.
function resolveSyncRemoteDir(lease: PluginEnvironmentLease): string {
  const remoteCwd = lease.metadata?.remoteCwd;
  if (typeof remoteCwd === "string" && remoteCwd.trim().length > 0) {
    return remoteCwd.trim();
  }
  throw new Error("Kubernetes file sync requires a workspace remote dir on the lease metadata.");
}

/**
 * Resolve the running Sandbox-CR pod for a native file-sync operation and return
 * a `PodStreamExec` bound to it, exactly like `onEnvironmentExecute` resolves its exec
 * target: parse config, derive the namespace, wait for the Sandbox pod to reach
 * Ready (cached per lease), and find the pod name. The `job` backend carries no
 * file path and is out of scope — file sync is only supported on `sandbox-cr`.
 */
async function resolveSyncPodExec(
  params:
    | PluginEnvironmentSyncInParams
    | PluginEnvironmentSyncOutParams,
): Promise<{ exec: PodStreamExec; timeoutMs: number }> {
  const { lease } = params;
  if (!lease.providerLeaseId) {
    throw new Error("Kubernetes file sync requires a provider lease ID.");
  }

View on GitHub (pinned to 120ae5428f)

Solutions

  1. Ensure the lease metadata includes workspaceRemoteDir before file sync.

When it happens

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