deepseek-ai/deepseek-harness · error · Error

refusing to SIGKILL the terminal shell; terminate the termin

Error message

refusing to SIGKILL the terminal shell; terminate the terminal session instead

What it means

Error "refusing to SIGKILL the terminal shell; terminate the terminal session instead" thrown in deepseek-ai/deepseek-harness.

Source

Thrown at packages/e2b/subprocess-e2b/src/terminal.ts:326

      if (this.topLevelExited) throw new Error('terminal process has exited')
      await this.sandbox.pty.sendInput(this.pid, Buffer.from(data, 'utf8'), { signal })
    })
  }

  /** @inheritdoc */
  inspectForeground(): Promise<SubprocessTerminalForeground | undefined> {
    return this.trackOperation(signal => this.inspectForegroundOnce(signal))
  }

  /** @inheritdoc */
  signalForeground(signal: SubprocessTerminalSignal): Promise<number> {
    return this.trackOperation(async (operationSignal) => {
      const foreground = await this.inspectForegroundOnce(operationSignal)
      if (foreground === undefined) {
        throw new Error(`subprocess-e2b: cannot resolve foreground process group for terminal ${this.pid}`)
      }
      if (signal === 'SIGKILL' && foreground.processGroupId === this.pid) {
        throw new Error('refusing to SIGKILL the terminal shell; terminate the terminal session instead')
      }
      await this.sandbox.commands.run(
        `kill -${signal.slice(3)} -- -${foreground.processGroupId}`,
        commandOpts(this.controlEnvs, operationSignal),
      )
      return foreground.processGroupId
    })
  }

  /** @inheritdoc */
  terminate(): Promise<void> {
    if (this.cleanup !== undefined) return this.cleanup
    this.operationController.abort(new Error('subprocess-e2b: terminal is terminating'))
    const cleanup = this.closeAfterOperations()
    this.cleanup = cleanup
    void cleanup.catch((_cleanupFailure: unknown) => {
      this.cleanup = undefined
    })

View on GitHub (pinned to b150a551b8)

When it happens

Trigger: Thrown at packages/e2b/subprocess-e2b/src/terminal.ts:326 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of deepseek-ai/deepseek-harness@b150a551b8 (2026-08-24). Data as JSON: /api/errors/8ac0217ec1e94dfb. Report an issue: GitHub.