WebSocket vs SSE vs polling, reconnection with backoff and jitter, heartbeats, backpressure, message ordering, connection state UI, auth on upgrade, graceful degradation
94
98%
Does it follow best practices?
Impact
90%
1.87xAverage score across 5 eval scenarios
Passed
No known issues
{
"instruction": "Handle connection loss and reconnection for real-time transports",
"relevant_when": "Agent implements WebSocket, SSE, or real-time features including live updates, chat, notifications, dashboards, or streaming data",
"context": "Connections drop due to network issues, server restarts, and proxy timeouts. The client must reconnect automatically with exponential backoff and jitter. Without this, users see stale data after network blips. After reconnection, the client must recover state by re-subscribing to rooms and re-fetching current data.",
"sources": [
{
"type": "file",
"filename": "skills/realtime-web-patterns/SKILL.md",
"tile": "tessl-labs/realtime-web-patterns@0.2.0"
}
],
"checklist": [
{
"name": "reconnect-logic-exists",
"rule": "Client-side code handles connection loss and attempts to reconnect automatically, either via EventSource (built-in), Socket.IO reconnection config, or manual WebSocket reconnection logic",
"relevant_when": "Agent implements real-time client connection"
},
{
"name": "exponential-backoff-with-jitter",
"rule": "Reconnection uses exponential backoff (e.g., 1s, 2s, 4s, 8s...) with a maximum cap (e.g., 30s) and random jitter to avoid thundering herd. Fixed delays or immediate reconnection are not acceptable.",
"relevant_when": "Agent implements WebSocket reconnection (not SSE, which handles this automatically)"
},
{
"name": "state-recovery-on-reconnect",
"rule": "After reconnection, client re-subscribes to rooms/channels and re-fetches current state to fill gaps from the disconnect period. Simply reconnecting without state recovery leaves the UI stale.",
"relevant_when": "Agent implements real-time client that subscribes to specific resources or rooms"
},
{
"name": "dispose-guard",
"rule": "Reconnection logic has a dispose/cleanup mechanism so that unmounted components or closed pages do not keep reconnecting forever",
"relevant_when": "Agent implements WebSocket reconnection in a component-based framework"
}
]
}evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
skills
realtime-web-patterns
verifiers