Usually, when we ask Farcaster about the next messages batch, if there are no more messages, they don't return a cursor. This sometimes doesn't work as intended - and we keep receiving new cursors with the same messages batch. We can work around it by checking if the messages repeat.
https://linear.app/comm/issue/ENG-11343/farcaster-pagination-is-broken