From 6921e1cf63d19e7a2aab89553c439628995f604a Mon Sep 17 00:00:00 2001 From: Garry Tan Date: Sat, 4 Apr 2026 07:49:40 -0700 Subject: [PATCH] =?UTF-8?q?fix:=20disable=20idle=20timeout=20in=20headed?= =?UTF-8?q?=20mode=20=E2=80=94=20browser=20lives=20until=20closed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The 30-minute idle timeout only applies to headless mode now. In headed mode the user is looking at the Chrome window, so auto-shutdown is wrong. The browser stays alive until explicit disconnect or window close. Co-Authored-By: Claude Opus 4.6 (1M context) --- browse/src/server.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/browse/src/server.ts b/browse/src/server.ts index 279108dd..55b744aa 100644 --- a/browse/src/server.ts +++ b/browse/src/server.ts @@ -675,6 +675,9 @@ function resetIdleTimer() { } const idleCheckInterval = setInterval(() => { + // Headed mode: the user is looking at the browser. Never auto-die. + // Only shut down when the user explicitly disconnects or closes the window. + if (browserManager.getConnectionMode() === 'headed') return; if (Date.now() - lastActivity > IDLE_TIMEOUT_MS) { console.log(`[browse] Idle for ${IDLE_TIMEOUT_MS / 1000}s, shutting down`); shutdown();