From 2d97fddddc252441e8d8476eb2c2836e955d95c2 Mon Sep 17 00:00:00 2001 From: Neil <4138956+nwparker@users.noreply.github.com> Date: Wed, 17 Jun 2026 02:30:29 -0700 Subject: [PATCH] Keep hidden startup query parser active during window --- .../src/components/terminal-pane/pty-connection.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/renderer/src/components/terminal-pane/pty-connection.ts b/src/renderer/src/components/terminal-pane/pty-connection.ts index cf2e7eb2401..f00be9964b0 100644 --- a/src/renderer/src/components/terminal-pane/pty-connection.ts +++ b/src/renderer/src/components/terminal-pane/pty-connection.ts @@ -2850,7 +2850,13 @@ export function connectPanePty( } function isHiddenStartupRendererQueryWindowActive(): boolean { - return shouldSnapshotHiddenCodexOutput && hiddenStartupRendererQueryPending.length > 0 + return ( + shouldSnapshotHiddenCodexOutput && + // Why: non-query bytes during the startup window can dirty hidden xterm + // state, so the parser must observe them before answering CPR/DECRQM. + (Date.now() < hiddenStartupRendererQueryWindowExpiresAt || + hiddenStartupRendererQueryPending.length > 0) + ) } function takeHiddenStartupRendererQueryPendingForForeground(data: string): {