Designing Reconnect-Safe Event Streams for Remote Coding Agents

A remote coding-agent interface can show a green connection indicator and still be wrong. The socket may be alive while the UI is missing messages. A permission card may still look pending after the tool has run. A phone may reconnect and replay an old assistant chunk over a newer terminal state. These failures feel like networking bugs, but most of them are really data-consistency bugs. A Connected Socket Can Still Show an Incomplete Truth A WebSocket answers one narrow question: can two endpoints exchange frames right now? A remote agent client needs answers to harder questions: Which events exist for this session? Which of those events has this client already rendered? Which actions
…