File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1473,15 +1473,17 @@ export const Chat = ({
14731473 ) }
14741474
14751475 { reviewMode ? (
1476- // Review takes precedence over the session-ended banner: during the
1477- // grace window the agent may still be asking to run tools, and
1478- // those approvals must be reachable for the run to finish.
1476+ // Review and ask_user take precedence over the session-ended banner:
1477+ // during the grace window the agent may still be asking to run tools
1478+ // or asking the user a question, and those approvals/answers must be
1479+ // reachable for the run to finish — otherwise the agent hangs
1480+ // waiting for input that can never be given.
14791481 < ReviewScreen
14801482 onSelectOption = { handleReviewOptionSelect }
14811483 onCustom = { handleReviewCustom }
14821484 onCancel = { handleCloseReviewScreen }
14831485 />
1484- ) : isFreebuffSessionOver ? (
1486+ ) : isFreebuffSessionOver && ! askUserState ? (
14851487 < SessionEndedBanner
14861488 isStreaming = { isStreaming || isWaitingForResponse }
14871489 />
Original file line number Diff line number Diff line change @@ -510,10 +510,16 @@ function handleFreebuffGateError(
510510 switch ( kind ) {
511511 case 'session_expired' :
512512 case 'waiting_room_required' :
513- // Our seat is gone mid-chat. Flip to `ended` instead of auto re-queuing:
514- // the Chat surface stays mounted so any in-flight agent work can finish
515- // under the server-side grace period, and the session-ended banner
516- // prompts the user to press Enter when they're ready to rejoin.
513+ // Our seat is gone mid-chat. Finalize the AI message so its streaming
514+ // indicator stops — otherwise `isComplete` stays false and the message
515+ // keeps rendering a blinking cursor forever, making the user think the
516+ // agent is still working even though the SessionEndedBanner is visible
517+ // and actionable. Also disposes the batched-updater flush interval.
518+ updater . markComplete ( )
519+ // Flip to `ended` instead of auto re-queuing: the Chat surface stays
520+ // mounted so any in-flight agent work can finish under the server-side
521+ // grace period, and the session-ended banner prompts the user to press
522+ // Enter when they're ready to rejoin.
517523 markFreebuffSessionEnded ( )
518524 return
519525 case 'waiting_room_queued' :
You can’t perform that action at this time.
0 commit comments