Skip to content

The agent that grows with you

fix(desktop): preserve intentional turn interruptions

Yuan Libb52a1b87e08
diff --git a/apps/desktop/src/store/session-states.ts b/apps/desktop/src/store/session-states.ts
index ee144a11994..62801b39b60 100644
--- a/apps/desktop/src/store/session-states.ts
+++ b/apps/desktop/src/store/session-states.ts
@@ -541,7 +541,9 @@ function withNoReplyNotice(messages: ChatMessage[]): ChatMessage[] {
* user started meanwhile is either live (skipped) or has its own reply. */
function markTurnWithoutReply(runtimeId: string) {
writeSessionState(runtimeId, state =>
- isLiveTurnAwaitingEvents(state) || turnHasReply(state.messages)
+ // An explicit Stop or a superseding prompt owns this terminal transition.
+ // Never replace that intentional interruption with a retryable no-reply card.
+ state.interrupted || isLiveTurnAwaitingEvents(state) || turnHasReply(state.messages)
? state
: { ...state, messages: withNoReplyNotice(state.messages) }
)