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/subprocess/subprocess-local/src/terminal.ts:101

  // Local inspection is synchronous; the seam returns a promise for remote transports.
  // oxlint-disable-next-line typescript/require-await -- Preserve promise rejection semantics at the async provider contract.
  async inspectForeground(): Promise<SubprocessTerminalForeground | undefined> {
    this.descendants()
    const processGroupId = this.inspector.foregroundPgid(this.pid)
    if (processGroupId === undefined) return undefined
    return {
      processGroupId,
      inputWaiting: this.inspector.isStdinWaiting(processGroupId),
    }
  }

  async signalForeground(signal: SubprocessTerminalSignal): Promise<number> {
    const foreground = await this.inspectForeground()
    if (foreground === undefined) {
      throw new Error(`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')
    }
    if (this.platform === 'win32') {
      if (signal === 'SIGINT') {
        // Windows has no process-group signalling: a `\x03` input write is the
        // Ctrl-C delivery path conhost turns into a console-wide CTRL_C event
        // for attached processes. node-pty's signal kills throw on Windows, so
        // no signal ever reaches the inspector.
        this.terminal.write('\x03')
        return foreground.processGroupId
      }
      if (signal === 'SIGTSTP' || signal === 'SIGHUP') {
        throw new Error(`signal ${signal} is unsupported on Windows; only SIGINT, SIGTERM, and SIGKILL are available`)
      }
    }
    this.inspector.signalGroup(foreground.processGroupId, signal)
    return foreground.processGroupId
  }

View on GitHub (pinned to b150a551b8)

Solutions

  1. Terminate the terminal session instead of SIGKILLing its shell process.

When it happens

Trigger: Thrown at packages/subprocess/subprocess-local/src/terminal.ts:101 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/0a5d85fde17065d0. Report an issue: GitHub.