Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions apps/desktop/src/app/session/hooks/use-session-actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,14 @@ export function useSessionActions({
activeSessionIdRef.current = null
busyRef.current = true
setBusy(true)
// Safety kill switch: reset busy after 30s if resume stalls or navigated away.
// Without this, a gateway session.resume that hangs, or an isCurrentResume()
// guard that blocks the finally-reset, leaves the composer send button stuck
// in "running" state permanently.
const resumeBusyTimer = setTimeout(() => {
busyRef.current = false
setBusy(false)
}, 30_000)
setAwaitingResponse(false)
clearNotifications()
setSelectedStoredSessionId(storedSessionId)
Expand Down Expand Up @@ -607,6 +615,7 @@ export function useSessionActions({
setMessages(preserveLocalAssistantErrors(toChatMessages(fallback.messages), $messages.get()))
notifyError(err, copy.resumeFailed)
} finally {
clearTimeout(resumeBusyTimer)
if (isCurrentResume()) {
busyRef.current = false
setBusy(false)
Expand Down