Skip to content

Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.

Guard delayed terminal exit callback

Julius Marminge21c823ecdc63
diff --git a/apps/web/src/components/ThreadTerminalDrawer.tsx b/apps/web/src/components/ThreadTerminalDrawer.tsx
index 494adf36b..c2653a90d 100644
--- a/apps/web/src/components/ThreadTerminalDrawer.tsx
+++ b/apps/web/src/components/ThreadTerminalDrawer.tsx
@@ -349,6 +349,9 @@ function TerminalViewport({
}
hasHandledExitRef.current = true;
window.setTimeout(() => {
+ if (!hasHandledExitRef.current) {
+ return;
+ }
onSessionExitedRef.current();
}, 0);
}