From e1ba7ff6e2efb8bda3fac2cfbd1cd910030add59 Mon Sep 17 00:00:00 2001 From: Neil <4138956+nwparker@users.noreply.github.com> Date: Mon, 7 Sep 2026 20:06:18 -0700 Subject: [PATCH] perf(runtime): skip hibernation status scan when no runtime owners --- src/renderer/src/lib/agent-hibernation-coordinator.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/renderer/src/lib/agent-hibernation-coordinator.ts b/src/renderer/src/lib/agent-hibernation-coordinator.ts index 15062527e8f..6497bd6fd77 100644 --- a/src/renderer/src/lib/agent-hibernation-coordinator.ts +++ b/src/renderer/src/lib/agent-hibernation-coordinator.ts @@ -133,6 +133,10 @@ async function collectRuntimePtyLiveness( const targets = getRuntimeLivenessTargetWorktrees(state, targetWorktreeId) const runtimeLivePtyIdsByWorktreeId: Record = {} const runtimeLivenessRequiredWorktreeIds = [...targets.keys()] + if (targets.size === 0) { + // Why: an all-local install has nothing to ask, so it must not pay the status scan below. + return { runtimeLivePtyIdsByWorktreeId, runtimeLivenessRequiredWorktreeIds } + } const completedTabIds = new Set() for (const entry of Object.values(state.agentStatusByPaneKey)) { const tabId = entry?.state === 'done' ? getEntryTabId(entry) : null