Skip to content

The agent that grows with you

fix(desktop): retain session remount polling reset

joaomarcos1940c23a4fdc
diff --git a/apps/desktop/src/app/chat/composer/status-stack/index.tsx b/apps/desktop/src/app/chat/composer/status-stack/index.tsx
index 93f14c8e52d..27ed53c3422 100644
--- a/apps/desktop/src/app/chat/composer/status-stack/index.tsx
+++ b/apps/desktop/src/app/chat/composer/status-stack/index.tsx
@@ -21,6 +21,7 @@ import {
dismissBackgroundProcess,
groupStatusItems,
refreshBackgroundProcesses,
+ resetBackgroundPollingGuard,
type StatusGroup,
stopBackgroundProcess
} from '@/store/composer-status'
@@ -105,6 +106,10 @@ export function ComposerStatusStack({ queue, sessionId }: ComposerStatusStackPro
// process tool completions) live in use-message-stream.
useEffect(() => {
if (sessionId) {
+ // Opening/rebinding a session is a fresh runtime binding: clear any
+ // gone-latch left by a previous runtime under this id so the poll below
+ // is allowed to run again (see resetBackgroundPollingGuard).
+ resetBackgroundPollingGuard(sessionId)
void refreshBackgroundProcesses(sessionId)
void refreshSessionGoal(sessionId)
}