From 28e3c2e72c3ac9cccd72bed798bfb4ea4787e96c Mon Sep 17 00:00:00 2001 From: Matt Haynes Date: Sun, 22 Mar 2026 06:47:07 -0600 Subject: [PATCH] fix: prevent SIGTSTP crash on Windows (#2018) --- .../src/modes/interactive/interactive-mode.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/pi-coding-agent/src/modes/interactive/interactive-mode.ts b/packages/pi-coding-agent/src/modes/interactive/interactive-mode.ts index 469e11515..cd9550f12 100644 --- a/packages/pi-coding-agent/src/modes/interactive/interactive-mode.ts +++ b/packages/pi-coding-agent/src/modes/interactive/interactive-mode.ts @@ -2321,6 +2321,11 @@ export class InteractiveMode { } private handleCtrlZ(): void { + // On Windows, SIGTSTP doesn't exist - Ctrl+Z is not supported + if (process.platform === "win32") { + return; + } + // Ignore SIGINT while suspended so Ctrl+C in the terminal does not // kill the backgrounded process. The handler is removed on resume. const ignoreSigint = () => {};