From 7e9b792dc4134348d5d78226535663de969ee2ed Mon Sep 17 00:00:00 2001 From: Lex Christopherson Date: Sat, 14 Mar 2026 13:34:24 -0600 Subject: [PATCH] perf: reduce dispatch gap timeout from 30s to 5s The dispatch gap watchdog is a safety net for when the dispatch chain silently breaks. 30s is unnecessarily long and makes failures feel sluggish. 5s is plenty of time to detect a stall without the wait. Co-Authored-By: Claude Opus 4.6 (1M context) --- src/resources/extensions/gsd/auto.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/resources/extensions/gsd/auto.ts b/src/resources/extensions/gsd/auto.ts index c00a203f0..4d339c21d 100644 --- a/src/resources/extensions/gsd/auto.ts +++ b/src/resources/extensions/gsd/auto.ts @@ -171,7 +171,7 @@ let idleWatchdogHandle: ReturnType | null = null; * re-evaluation. Covers the case where dispatchNextUnit silently fails or * an unhandled error kills the dispatch chain. */ let dispatchGapHandle: ReturnType | null = null; -const DISPATCH_GAP_TIMEOUT_MS = 30_000; // 30 seconds +const DISPATCH_GAP_TIMEOUT_MS = 5_000; // 5 seconds /** SIGTERM handler registered while auto-mode is active — cleared on stop/pause. */ let _sigtermHandler: (() => void) | null = null;