Skip to content

Commit 26d936c

Browse files
committed
fix(sdk): preserve Stop delivery and cancellation outcomes
1 parent 4c100ce commit 26d936c

4 files changed

Lines changed: 869 additions & 102 deletions

File tree

‎.changeset/chat-stop-successor-boundary.md‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@
55
Keep new chat responses intact after Stop, including slow Stop acknowledgments and page reloads.
66
Stop on an idle hydrated session no longer discards the next response. Early resumed Stop retains its protection.
77

8+
Stop also protects messages and actions that still await an input acknowledgment.
9+
Canceled messages and actions do not append after session creation or token renewal.
10+
Stop retains token renewal but does not recreate a missing session after HTTP 404.
11+
12+
`stopGeneration(chatId, { throwOnError: true })` reports delivery failures with the original error and HTTP status.
13+
Without this option, delivery failures still return `false`. A missing local session returns `false` in both modes.
14+
The local reader stays closed after a delivery failure. The remote run can continue.
15+
816
Sequence-free replies after Stop require a transcript reload before further messages.
17+
Concurrent sends also respect this recovery requirement.
918
Loading a fresh transcript through `useLoadTranscript` restores blocked sessions only after its saved input cursor covers the stopped turn.
1019
Transcript recovery reports missing cursor evidence and empty output polls. An empty recovery poll keeps the accepted message available for reconnect.

0 commit comments

Comments
 (0)