<?xml version="1.0" encoding="UTF-8"?><oembed><type>video</type><version>1.0</version><html>&lt;iframe src=&quot;https://www.loom.com/embed/5280aa0180894a508f6ce8dde9052c98&quot; frameborder=&quot;0&quot; width=&quot;1920&quot; height=&quot;1440&quot; webkitallowfullscreen mozallowfullscreen allowfullscreen&gt;&lt;/iframe&gt;</html><height>1440</height><width>1920</width><provider_name>Loom</provider_name><provider_url>https://www.loom.com</provider_url><thumbnail_height>1440</thumbnail_height><thumbnail_width>1920</thumbnail_width><thumbnail_url>https://cdn.loom.com/sessions/thumbnails/5280aa0180894a508f6ce8dde9052c98-e25e6baadd140fdf.gif</thumbnail_url><duration>363.932</duration><title>Building WebSocket Sequencing with Resume Handling</title><description>This Loom explains how the author implemented sequenced streaming, tool call linking, and buffering in their backend connection handling. They describe fixing out of order token sequences in chaos mode using a nextExpected pointer, a buffer, and a set of processed sequence numbers to avoid duplicates. They also mention that tool call and tool result connections correctly jump to the related buffered cards, with behavior confirmed through example interactions. Finally, they note an unresolved issue where the backend did not resume after sending the resume message based on last sequence and last process.</description></oembed>