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) <noreply@anthropic.com>
This commit is contained in:
Guilhem Lemouel
2026-10-26 09:37:04 -07:00
co-authored by Claude Opus 5.5
parent 8b5b386609
commit 315bf9ce15
@@ -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