paperclipai/paperclip · error

Daytona syncIn requires a provider lease ID.

Error message

Daytona syncIn requires a provider lease ID.

What it means

Precondition check in onEnvironmentSyncIn: params.lease carries no providerLeaseId, so there is no concrete Daytona sandbox to upload into. The native inbound transfer (SDK batch uploadFiles plus host-side tarballs) needs a live lease, so the hook rejects the call rather than falling back silently.

Solutions

  1. Provide a provider lease ID on the lease metadata before syncIn.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at packages/plugins/sandbox-providers/daytona/src/plugin.ts:2611 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of paperclipai/paperclip@3f1d897a7c (2026-08-18). Data as JSON: /api/errors/5f294c6027438dc3. Report an issue: GitHub.

Appendix: source

Thrown at packages/plugins/sandbox-providers/daytona/src/plugin.ts:2728

      const sandbox = await getSandbox({
        driverKey: params.driverKey,
        companyId: params.companyId,
        environmentId: params.environmentId,
        providerLeaseId,
        config,
      }, {
        bypassTeardownGate: true,
        onCacheDecision: (hit) => {
          cacheHit = hit;
        },
      });
      const getDurationMs = timingNow() - getStart;
      const scope: SandboxScope = {
        driverKey: params.driverKey,
        companyId: params.companyId,
        environmentId: params.environmentId,
        providerLeaseId,
        config,
      };
      if (sandbox.state !== "started") {
        // A provider restart destroys Daytona process sessions. Drop the stale
        // session id before starting the sandbox so runnerd recovery opens a
        // new session instead of retrying a dead one for its whole grace.
        sandboxHandleSessionStore.clear(scope);
      }
      await ensureSandboxStarted(sandbox, toTimeoutSeconds(resolveTimeoutMs(params.timeoutMs, config)));
      // Dispatch the command. A normal command runs in the persistent session:
      // the provider opens the one session on a cache miss and runs every command
      // in it. The provider never falls back to a one-shot command to open a
      // session; a cache miss creates one.
      //
      // A `bypassSession` command runs one-shot and does NOT open the session.
      // The host sets this flag on a pre-run command (the workspace provision
      // command) that runs before the run opens its trace root. Opening the
      // session there would emit a `session.open` span with no run parent, and
      // the span backend would drop it. With the bypass the session opens on the

View on GitHub (pinned to 3f1d897a7c)