{"record":{"id":"4d5ccc4490f7c752","repo":"deepseek-ai/deepseek-harness","slug":"e2b-sandbox-service-is-disposing","errorCode":null,"errorMessage":"E2B sandbox service is disposing","messagePattern":"E2B sandbox service is disposing","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/e2b/e2b/src/index.ts","lineNumber":131,"sourceCode":"      } catch (_sandboxSetupFailure) {\n        // open() either acquired no sandbox or already made the POC's one rollback attempt.\n        return\n      }\n      try {\n        await sandbox.kill()\n      } catch (error: unknown) {\n        if (!(error instanceof SandboxNotFoundError)) throw error\n      }\n    }, 'e2b sandbox teardown')\n  }\n\n  /**\n   * Return the shared live SDK handle.\n   * @returns the created sandbox after the configured cwd exists.\n   * @throws when E2B rejects creation or the service is disposing.\n   */\n  async getSandbox(): Promise<Sandbox> {\n    if (this.disposed) throw new Error('E2B sandbox service is disposing')\n    const sandbox = await this.ready\n    // Disposal can race the awaited sandbox readiness despite the synchronous precheck.\n    // oxlint-disable-next-line typescript/no-unnecessary-condition -- Awaiting readiness yields to disposal.\n    if (this.disposed) throw new Error('E2B sandbox service is disposing')\n    return sandbox\n  }\n\n  private validate(): void {\n    if (this.config.apiKey.length === 0) {\n      throw new Error('dsh-e2b: configure apiKey or set E2B_API_KEY')\n    }\n    if (!posix.isAbsolute(this.config.cwd)) {\n      throw new Error(`dsh-e2b: cwd must be an absolute Linux path: ${this.config.cwd}`)\n    }\n    if (!Number.isFinite(this.config.timeoutMs) || this.config.timeoutMs <= 0) {\n      throw new Error('dsh-e2b: timeoutMs must be a positive finite number')\n    }\n  }","sourceCodeStart":113,"sourceCodeEnd":149,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/e2b/e2b/src/index.ts#L113-L149","documentation":"Error \"E2B sandbox service is disposing\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/e2b/e2b/src/index.ts:131 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b150a551b8d465e31e418e1b2eaf5e79bbb7d28e","analyzedAt":"2026-08-24T18:12:29.105Z","schemaVersion":2},"datasetVersion":"2026-08-24T22:17:12.610Z"}