Skip to content

The agent that grows with you

fix(desktop): keep interruption guard within file health cap

Yuan Li5e9cf22ef63a
diff --git a/apps/desktop/src/store/session-states.ts b/apps/desktop/src/store/session-states.ts
index 62801b39b60..3ec1898ecf8 100644
--- a/apps/desktop/src/store/session-states.ts
+++ b/apps/desktop/src/store/session-states.ts
@@ -537,12 +537,10 @@ function withNoReplyNotice(messages: ChatMessage[]): ChatMessage[] {
]
}
-/** Stamp the retry card on an ended turn that has no reply. A newer turn the
- * user started meanwhile is either live (skipped) or has its own reply. */
+/** Stamp the retry card on an ended turn that has no reply, never an intentional
+ * interruption. A newer turn is either live (skipped) or has its own reply. */
function markTurnWithoutReply(runtimeId: string) {
writeSessionState(runtimeId, state =>
- // 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) }