selectSession in ui/src/chat/state.ts:251-271 does not abort the running turn. The old stream keeps writing: it sets currentSession (:537) and appends its reply to the conversation now open (:572-578). The transcript read at :264 also has no current-session check, so a slow read for an earlier conversation can overwrite the open one.
Done when: switching conversation aborts or detaches the running turn, and no write lands unless its session id is still current (the guard reloadTranscript uses at :305).
`selectSession` in `ui/src/chat/state.ts:251-271` does not abort the running turn. The old stream keeps writing: it sets `currentSession` (`:537`) and appends its reply to the conversation now open (`:572-578`). The transcript read at `:264` also has no current-session check, so a slow read for an earlier conversation can overwrite the open one.
Done when: switching conversation aborts or detaches the running turn, and no write lands unless its session id is still current (the guard `reloadTranscript` uses at `:305`).
Fixed in bd1acdd0 and pushed. selectSession bumps a module-level sessionEpoch and calls abortActiveTurn() before switching, so the old stream is aborted; its readTranscript result is applied only when isCurrentSession(id) still holds. sendMessage captures the epoch at turn start and checks it on every stream read — a detached turn cancels the reader and returns without writing messages/streamingTurn/currentSession, and the catch path returns early when detached. The finally only clears isSending when the turn still owns activeController, so an aborted turn can't unlock the composer while a new turn runs in the switched-to conversation. Verified: task check exited 0 on the committed tree.
Fixed in bd1acdd0 and pushed. selectSession bumps a module-level sessionEpoch and calls abortActiveTurn() before switching, so the old stream is aborted; its readTranscript result is applied only when isCurrentSession(id) still holds. sendMessage captures the epoch at turn start and checks it on every stream read — a detached turn cancels the reader and returns without writing messages/streamingTurn/currentSession, and the catch path returns early when detached. The finally only clears isSending when the turn still owns activeController, so an aborted turn can't unlock the composer while a new turn runs in the switched-to conversation. Verified: task check exited 0 on the committed tree.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
selectSessioninui/src/chat/state.ts:251-271does not abort the running turn. The old stream keeps writing: it setscurrentSession(:537) and appends its reply to the conversation now open (:572-578). The transcript read at:264also has no current-session check, so a slow read for an earlier conversation can overwrite the open one.Done when: switching conversation aborts or detaches the running turn, and no write lands unless its session id is still current (the guard
reloadTranscriptuses at:305).Fixed in
bd1acdd0and pushed. selectSession bumps a module-level sessionEpoch and calls abortActiveTurn() before switching, so the old stream is aborted; its readTranscript result is applied only when isCurrentSession(id) still holds. sendMessage captures the epoch at turn start and checks it on every stream read — a detached turn cancels the reader and returns without writing messages/streamingTurn/currentSession, and the catch path returns early when detached. The finally only clears isSending when the turn still owns activeController, so an aborted turn can't unlock the composer while a new turn runs in the switched-to conversation. Verified: task check exited 0 on the committed tree.Fixed in
bd1acdd0and pushed to main. Gate: task check exited 0 on the committed tree.