Same-millisecond rows were silently skipped between pages because the log cursor had no tiebreak and the events cursor tied by instance_id (which also collides when one instance emits multiple events within a millisecond). Add an insert_id UUID (DEFAULT generateUUIDv4()) column to both logs and agent_events, order by (timestamp, insert_id) consistently, and encode the cursor as 'timestamp|insert_id'. Existing data is materialized via ALTER TABLE MATERIALIZE COLUMN (one-time background mutation). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>