From e795491fcf025fd6f4b699005c495c0db0689ab4 Mon Sep 17 00:00:00 2001 From: Ingo Wolf Date: Sun, 13 Sep 2026 00:51:14 +1000 Subject: [PATCH] fix(coding-agent): Kevin --- .../src/modes/interactive/interactive-mode.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/packages/coding-agent/src/modes/interactive/interactive-mode.ts b/packages/coding-agent/src/modes/interactive/interactive-mode.ts index 3af1b1c1..a77c10b8 100644 --- a/packages/coding-agent/src/modes/interactive/interactive-mode.ts +++ b/packages/coding-agent/src/modes/interactive/interactive-mode.ts @@ -2378,6 +2378,9 @@ export class InteractiveMode { } if (text === "/quit") { this.editor.setText(""); + if (this.session.isStreaming) { + return; + } await this.shutdown(); return; } @@ -3038,6 +3041,9 @@ export class InteractiveMode { // ========================================================================= private handleCtrlC(): void { + if (this.session.isStreaming) { + return; + } const now = Date.now(); if (now - this.lastSigintTime < 500) { void this.shutdown(); @@ -3049,6 +3055,9 @@ export class InteractiveMode { private handleCtrlD(): void { // Only called when editor is empty (enforced by CustomEditor) + if (this.session.isStreaming) { + return; + } void this.shutdown(); } @@ -3157,6 +3166,9 @@ export class InteractiveMode { for (const signal of signals) { const handler = () => { + if (this.session.isStreaming) { + return; + } // SIGHUP no longer hard-exits: graceful shutdown emits session_shutdown // first, then attempts terminal restore. A genuinely dead terminal // surfaces as an EIO on the restore writes, which the stdout/stderr