{"record":{"id":"5f294c6027438dc3","repo":"paperclipai/paperclip","slug":"daytona-syncin-requires-a-provider-lease-id","errorCode":null,"errorMessage":"Daytona syncIn requires a provider lease ID.","messagePattern":"Daytona syncIn requires a provider lease ID\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/plugins/sandbox-providers/daytona/src/plugin.ts","lineNumber":2728,"sourceCode":"      const sandbox = await getSandbox({\n        driverKey: params.driverKey,\n        companyId: params.companyId,\n        environmentId: params.environmentId,\n        providerLeaseId,\n        config,\n      }, {\n        bypassTeardownGate: true,\n        onCacheDecision: (hit) => {\n          cacheHit = hit;\n        },\n      });\n      const getDurationMs = timingNow() - getStart;\n      const scope: SandboxScope = {\n        driverKey: params.driverKey,\n        companyId: params.companyId,\n        environmentId: params.environmentId,\n        providerLeaseId,\n        config,\n      };\n      if (sandbox.state !== \"started\") {\n        // A provider restart destroys Daytona process sessions. Drop the stale\n        // session id before starting the sandbox so runnerd recovery opens a\n        // new session instead of retrying a dead one for its whole grace.\n        sandboxHandleSessionStore.clear(scope);\n      }\n      await ensureSandboxStarted(sandbox, toTimeoutSeconds(resolveTimeoutMs(params.timeoutMs, config)));\n      // Dispatch the command. A normal command runs in the persistent session:\n      // the provider opens the one session on a cache miss and runs every command\n      // in it. The provider never falls back to a one-shot command to open a\n      // session; a cache miss creates one.\n      //\n      // A `bypassSession` command runs one-shot and does NOT open the session.\n      // The host sets this flag on a pre-run command (the workspace provision\n      // command) that runs before the run opens its trace root. Opening the\n      // session there would emit a `session.open` span with no run parent, and\n      // the span backend would drop it. With the bypass the session opens on the","sourceCodeStart":2710,"sourceCodeEnd":2746,"githubUrl":"https://github.com/paperclipai/paperclip/blob/3f1d897a7c018d76563a21c6e39c3c9b03933622/packages/plugins/sandbox-providers/daytona/src/plugin.ts#L2710-L2746","documentation":"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.","triggerScenarios":"Thrown at packages/plugins/sandbox-providers/daytona/src/plugin.ts:2611 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide a provider lease ID on the lease metadata before syncIn."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3f1d897a7c018d76563a21c6e39c3c9b03933622","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}