deepseek-ai/deepseek-harness · error · Error
terminal cleanup failed; surviving pids: ${survivors.map(mem
Error message
terminal cleanup failed; surviving pids: ${survivors.map(member => member.pid).join(', ')} What it means
Error "terminal cleanup failed; surviving pids: ${survivors.map(member => member.pid).join(', ')}" thrown in deepseek-ai/deepseek-harness.
Source
Thrown at packages/subprocess/subprocess-local/src/terminal.ts:296
if (!shellGone() && this.rootIdentity !== undefined) {
this.inspector.signalProcess(this.rootIdentity, 'SIGKILL')
await this.waitForWindowsShellExit()
}
if (!shellGone()) throw new Error(`terminal cleanup failed; surviving pid: ${this.pid}`)
}
private async waitForWindowsShellExit(): Promise<void> {
const until = Date.now() + this.graceMs
while (!this.exited && Date.now() < until) {
if (this.rootIdentity !== undefined && !this.inspector.isAlive(this.rootIdentity)) return
await delay(Math.min(25, Math.max(1, until - Date.now())))
}
}
private async closeOnce(): Promise<void> {
let survivors = await this.stopDescendants()
if (survivors.length > 0) {
throw new Error(`terminal cleanup failed; surviving pids: ${survivors.map(member => member.pid).join(', ')}`)
}
await this.stopShell()
survivors = await this.stopDescendants()
if (survivors.length > 0) {
throw new Error(`terminal cleanup failed; surviving pids: ${survivors.map(member => member.pid).join(', ')}`)
}
this.settleExitIfGone()
this.dataDisposable.dispose()
this.exitDisposable.dispose()
}
private settleExitIfGone(): void {
// An externally taskkilled Windows shell may never fire node-pty's exit
// notification (its console-list agent fails without a parent console),
// which would leave `done` — and every consumer awaiting it — unsettled
// forever. Teardown has just verified the shell's absence through the
// inspector, so a missing exit event is itself the outcome.
if (this.platform !== 'win32') returnView on GitHub (pinned to b150a551b8)
Solutions
- Kill the listed surviving pids manually and check why they ignored termination.
When it happens
Trigger: Thrown at packages/subprocess/subprocess-local/src/terminal.ts:296 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/a1f238f57a8df5a4.
Report an issue: GitHub.