{"record":{"id":"3d229cc2508f0579","repo":"paperclipai/paperclip","slug":"sandbox-driver-does-not-support-direct-command-exe","errorCode":null,"errorMessage":"Sandbox driver does not support direct command execution for built-in providers.","messagePattern":"Sandbox driver does not support direct command execution for built-in providers\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/src/services/environment-runtime.ts","lineNumber":2480,"sourceCode":"          `Pending-cleanup lease \"${input.lease.id}\" has no recorded config for provider \"${recordedProvider}\".`,\n        );\n      }\n\n      // Plugin-backed provider path. The Claude login runs on a plugin-backed\n      // sandbox, so this path tears down the login orphan.\n      if (!isBuiltinSandboxProvider(recordedProvider)) {\n        if (!pluginWorkerManager) {\n          throw new Error(\n            `Sandbox provider \"${recordedProvider}\" needs a plugin worker manager for cleanup, but none is available.`,\n          );\n        }\n        const pluginProvider = await resolveSandboxProviderPlugin({ provider: recordedProvider });\n        if (pluginProvider.state !== \"running\") {\n          throw new Error(\n            `Sandbox provider plugin for \"${recordedProvider}\" is ${pluginProvider.state}, so the cleanup teardown cannot run yet.`,\n          );\n        }\n        // Resolve the recorded secret refs through the durable orphan record,\n        // not the environment binding. A delete removed the binding, or a\n        // provider change replaced it, so environment-bound resolution would\n        // reject the recorded API-key ref and strand the teardown forever.\n        const config = await resolveSandboxCleanupConfigSecrets(\n          db,\n          input.lease.companyId,\n          metadataConfig,\n          { issueId: input.lease.issueId, heartbeatRunId: input.lease.heartbeatRunId },\n        );\n        const workerConfig = stripSandboxProviderEnvelope(config as SandboxEnvironmentConfig);\n        await pluginWorkerManager.call(\n          pluginProvider.resolved.plugin.id,\n          \"environmentDestroyLease\",\n          {\n            driverKey: recordedProvider,\n            companyId: input.lease.companyId,\n            // The provider teardown keys on the provider lease id. The\n            // environment id is only context, and it is empty when a delete","sourceCodeStart":2462,"sourceCodeEnd":2498,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/server/src/services/environment-runtime.ts#L2462-L2498","documentation":"Capability guard on the sandbox driver's direct-execute path: a direct, session-less command execution was requested against a built-in sandbox provider, but built-in providers route commands through their own session/lease machinery and do not implement the direct execute method. The request is rejected instead of silently doing something else.","triggerScenarios":"Thrown at server/src/services/environment-runtime.ts:2324 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use an environment driver that supports direct command execution, or route commands through the supported interface."],"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-14T05:17:10.506Z"}