mirror of
https://github.com/tiennm99/ccs.git
synced 2026-07-16 02:11:28 +00:00
Red-team review of #1340 found that backgroundProbe / shouldKeepSessionProxiesAlive / startKeepAliveWatcher and related types were never reachable: the sole caller (claude-launcher.ts) passed no hasBackgroundWorkerUsingBaseUrl detector, so backgroundProbe was always undefined and the keepalive branch never executed. Remove the unreachable scaffold: - Delete CLAUDE_BG_WORKER_ARGS, hasClaudeBackgroundWorkerUsingBaseUrl{,InProcessList}, shouldKeepSessionProxiesAlive, ShouldKeepSessionProxiesAliveOptions, and the SessionProxyKeepAliveOptions interface from session-bridge.ts - Remove the backgroundProbe/startKeepAliveWatcher block and keepalive exit branch from setupCleanupHandlers; the function now always calls stopSessionResources on Claude exit - Remove backgroundKeepAliveBaseUrl wiring from claude-launcher.ts - Remove the execFileSync import (was only used by the deleted ps-based detector) - Update test file: remove tests for deleted exports, keep placeholder A trusted bg-worker detector can be re-added in a future PR if the feature is actually needed; the keepalive logic in shouldKeepSessionProxiesAlive can be restored then.