You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(chat,sdk): stop an unconsumed control record wedging the mailbox
`chat.messages.next()` and `hasPending()` only inspect the head of the
`.in` buffer. A control record whose kind has no consumer on this boot
therefore parked at the head forever, and every message queued behind it
became undeliverable with no error: `hasPending()` stayed false and
`next()` timed out on every call.
Records of a kind nothing on the run consumes are now discarded at
dispatch instead. Consuming at dispatch keeps the resume cursor exact,
since the record never enters the buffer and so leaves no unconsumed
barrier for `lastDispatchedSeqNum()` to clamp behind. `message` is always
claimed, and handover kinds are claimed for the window in which a
handover-prepare boot is actually waiting for them.
The mixed-kinds test now builds its blocked-head state on a
handover-prepare boot, where the handover kind is claimed and so stays
buffered for the raw read it asserts.
Copy file name to clipboardExpand all lines: .changeset/tidy-mailboxes-wait.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,3 +4,5 @@
4
4
---
5
5
6
6
Custom agent loops can now inspect pending chat input without consuming it and consume one mailbox record at a time with `chat.messages.hasPending()` and `chat.messages.next()`. Mailbox records include stable identifiers for tracing and redelivery.
7
+
8
+
A control record that nothing on the run consumes is now discarded rather than left at the head of the `.in` channel, where it would have made every message queued behind it undeliverable. `chat.messages.next()` returning `undefined` now always means the mailbox is idle.
0 commit comments