The best way to control Claude Code, Codex and more from any computer or phone
Guard delayed terminal exit callback
- Skip `onSessionExited` if exit handling was reset before timeout runs - Prevent stale async exit callbacks from firing in terminal drawer
Julius Marminge committed
Feb 27, 2026 at 18:02 UTC
21c823ecdc63ebfae0226f174f639191a971cd85
1 file changed
+3
apps/web/src/components/ThreadTerminalDrawer.tsx
+3
@@ -349,6 +349,9 @@ function TerminalViewport({
349
}
350
hasHandledExitRef.current = true;
351
window.setTimeout(() => {
352
+ if (!hasHandledExitRef.current) {
353
+ return;
354
+ }
355
onSessionExitedRef.current();
356
}, 0);
357
}