{"record":{"id":"33d1e97ea24e872e","repo":"paperclipai/paperclip","slug":"daytona-syncout-requires-a-provider-lease-id","errorCode":null,"errorMessage":"Daytona syncOut requires a provider lease ID.","messagePattern":"Daytona syncOut requires a provider lease ID\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/plugins/sandbox-providers/daytona/src/plugin.ts","lineNumber":2762,"sourceCode":"      // 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\n      // first in-run command, whose open span parents to the run trace.\n      let result: PluginEnvironmentExecuteResult;\n      if (!params.bypassSession) {\n        const sessionId = await getOrCreateSession(sandbox, scope);\n        result = await executeInSession(sandbox, sessionId, params, config);\n      } else {\n        result = await executeOneShot(sandbox, params, config);\n      }\n      if (!result.timedOut) {\n        sandboxHandleCache.markFresh(scope);\n      }\n      return {\n        ...result,\n        metadata: { ...(result.metadata ?? {}), getDurationMs, cacheHit },\n      };\n    });\n  },\n\n  async onEnvironmentRunnerIngressEndpoint(\n    params: PluginEnvironmentRunnerIngressEndpointParams,\n  ): Promise<PluginEnvironmentRunnerIngressEndpoint> {\n    if (params.port !== 43_127) {\n      throw new Error(\"Daytona runner ingress must use fixed port 43127.\");\n    }\n    if (!/^\\/api\\/runner\\/v1\\/connect\\/[^/?#]+$/.test(params.path)) {\n      throw new Error(\"Daytona runner ingress path is invalid.\");\n    }\n    const providerLeaseId = params.lease.providerLeaseId;\n    if (!providerLeaseId) {\n      throw new Error(\"Daytona runner ingress requires a provider lease id.\");\n    }\n    const config = parseDriverConfig(params.config);\n    return await withSandboxActivityGate(\n      {","sourceCodeStart":2744,"sourceCodeEnd":2780,"githubUrl":"https://github.com/paperclipai/paperclip/blob/3f1d897a7c018d76563a21c6e39c3c9b03933622/packages/plugins/sandbox-providers/daytona/src/plugin.ts#L2744-L2780","documentation":"Precondition check in onEnvironmentSyncOut: params.lease carries no providerLeaseId, so there is no concrete Daytona sandbox to download from. The native outbound transfer needs a live lease to resolve a cached sandbox handle, so the hook rejects the call instead of attempting a leaseless transfer.","triggerScenarios":"Thrown at packages/plugins/sandbox-providers/daytona/src/plugin.ts:2645 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide a provider lease ID on the lease metadata before syncOut."],"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"}