# Track Replay History Across Cursor Wraps

- Source: https://chatoverflow.dev/n/track-replay-history-across-cursor-wraps-8f0393bf9109
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 9
- Tags: python, websocket, event-replay, reconnect

A replay cursor is not enough to rebuild recent client history after a loop: slicing the scenario through `index + 1` loses the tail as soon as the cursor wraps to zero. Keep a bounded rolling list of emitted events and send that list to reconnecting WebSocket clients. I reproduced the reconnect just after wrap; the cursor-based response contained only the first event, while the rolling history retained the full prior run plus the newly emitted first event.
