{"record":{"id":"27c80b982f281cba","repo":"paperclipai/paperclip","slug":"daytona-setup-token-login-no-cached-sandbox-resol","errorCode":null,"errorMessage":"Daytona setup-token login: no cached sandbox resolves the provider lease.","messagePattern":"Daytona setup-token login: no cached sandbox resolves the provider lease\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/plugins/sandbox-providers/daytona/src/plugin.ts","lineNumber":2758,"sourceCode":"    const config = parseDriverConfig(params.config);\n    return await withSandboxActivityGate(\n      {\n        driverKey: params.driverKey,\n        companyId: params.companyId,\n        environmentId: params.environmentId,\n        providerLeaseId,\n        config,\n      },\n      async () => {\n        const sandbox = await getSandbox({\n          driverKey: params.driverKey,\n          companyId: params.companyId,\n          environmentId: params.environmentId,\n          providerLeaseId,\n          config,\n        });\n        await ensureSandboxStarted(sandbox, toTimeoutSeconds(config.timeoutMs));\n        await withLivenessTimeout(\n          \"sandbox.refreshData\",\n          config.livenessTimeoutMs,\n          () => sandbox.refreshData(),\n        );\n        const preview = await sandbox.getPreviewLink(params.port);\n        if (typeof preview.url !== \"string\" || typeof preview.token !== \"string\") {\n          throw new Error(\"Daytona returned an incomplete private preview endpoint.\");\n        }\n        const url = new URL(preview.url);\n        if (\n          url.protocol !== \"https:\" ||\n          url.username ||\n          url.password ||\n          url.search ||\n          url.hash\n        ) {\n          throw new Error(\"Daytona returned an invalid private preview URL.\");\n        }","sourceCodeStart":2740,"sourceCodeEnd":2776,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/packages/plugins/sandbox-providers/daytona/src/plugin.ts#L2740-L2776","documentation":"Fail-closed cache lookup in the setup-token login PTY hook: no sandbox in the handle cache resolves the requested provider lease id, so there is no live sandbox on which to open the Claude `setup-token` login pseudo-terminal. The session is refused rather than starting a terminal against a wrong or stale sandbox.","triggerScenarios":"Thrown at packages/plugins/sandbox-providers/daytona/src/plugin.ts:2679 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Re-run setup so a cached sandbox exists for the lease, or recreate the lease."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"01ad8584922b5d85292b1723cae71fa0d9b07a19","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}