From 315bf9ce1505b5c1fd92dd4a9ba4cae8945cf876 Mon Sep 17 00:00:00 2001 From: Guilhem Lemouel Date: Mon, 26 Oct 2026 09:37:04 -0700 Subject: [PATCH] fix: refuse to confirm a move while a turn runs A turn started while the move dialog was open owns the cross-tab hold the move would take, and the move would release it while the turn still runs. Co-Authored-By: Claude Opus 5.5 (1M context) --- frontend/src/lib/components/sessions/SessionWrapper.svelte | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/frontend/src/lib/components/sessions/SessionWrapper.svelte b/frontend/src/lib/components/sessions/SessionWrapper.svelte index 4c84712d28..635099de53 100644 --- a/frontend/src/lib/components/sessions/SessionWrapper.svelte +++ b/frontend/src/lib/components/sessions/SessionWrapper.svelte @@ -498,6 +498,12 @@ sendUserToast('This session moved to another workspace meanwhile. Pick the fork again.', true) return } + // A turn started while the dialog was open (a job's auto-resume) owns the cross-tab hold + // below; the move would release it while that turn still runs. + if (!canMoveToFork) { + moveRequest = { ...req, open: true, error: 'A chat turn is running. Retry once it ends.' } + return + } moving = true const releaseAutoResume = runtime?.manager.holdAutoResume() // Bracketed like a turn, so another tab on this session cannot send while its drafts