{"record":{"id":"b81131712ff44922","repo":"deepseek-ai/deepseek-harness","slug":"subprocess-e2b-teardown-failed","errorCode":null,"errorMessage":"subprocess-e2b: teardown failed","messagePattern":"subprocess-e2b: teardown failed","errorType":"exception","errorClass":"AggregateError","httpStatus":null,"severity":"error","filePath":"packages/e2b/subprocess-e2b/src/index.ts","lineNumber":98,"sourceCode":"      const handles = [...this.live]\n      const terminals = [...this.terminals]\n      const pending: Promise<unknown>[] = []\n      for (const handle of handles) {\n        handle.terminate()\n        pending.push(handle.waitForExit().then(async () => {\n          await handle.done.catch(() => undefined)\n          this.live.delete(handle)\n        }))\n      }\n      for (const terminal of terminals) {\n        pending.push(terminal.terminate().then(() => { this.terminals.delete(terminal) }))\n      }\n      const outcomes = await Promise.allSettled(pending)\n      const failures = outcomes.flatMap<unknown>(outcome => outcome.status === 'rejected'\n        ? [outcome.reason as unknown]\n        : [])\n      if (failures.length === 1) throw asError(failures[0])\n      if (failures.length > 1) throw new AggregateError(failures, 'subprocess-e2b: teardown failed')\n    }, 'e2b subprocess teardown')\n  }\n\n  /** @inheritdoc */\n  async resolveExecutable(\n    command: string,\n    env?: Readonly<Record<string, string>>,\n    signal?: AbortSignal,\n  ): Promise<string> {\n    if (command.length === 0) throw new Error('subprocess-e2b: executable name must be non-empty')\n    signal?.throwIfAborted()\n    const sandbox = await this.ctx.e2b.getSandbox()\n    if (posix.isAbsolute(command)) {\n      await sandbox.commands.run(\n        `test -f ${quoteE2BShellArg(command)} -a -x ${quoteE2BShellArg(command)}`,\n        { envs: e2bControlEnvs(), ...signalOpts(signal) },\n      )\n      signal?.throwIfAborted()","sourceCodeStart":80,"sourceCodeEnd":116,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/e2b/subprocess-e2b/src/index.ts#L80-L116","documentation":"Error \"subprocess-e2b: teardown failed\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/e2b/subprocess-e2b/src/index.ts:98 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"}