WebSocket reconnect retries forever, no terminal failure mode
Severity: Low
Affected repos: middleware-node, middleware-python
Component boundary: middleware local transport
Symptom
Both SDKs reconnect to the local WebSocket forever on backoff (capped at 30s). There is no "I've tried for 10 minutes, the server isn't coming back, stop spending CPU on this" mode. Combined with critical/01 (the server doesn't exist), every default-config user's host process spends a small fraction of its CPU on doomed reconnects for its lifetime.
Impact
- CPU/log noise in the user's host application.
- No actionable feedback that local mode isn't working.
Fix recommendation
After N (say, 20) consecutive failed reconnect attempts, emit a one-time onError({ kind: "local_unreachable" }), pause reconnect attempts, and only resume on an explicit handle.reconnect() call or process restart. Log a single warning to stderr the first time the threshold is hit.
Verification
- Run an app with local mode for an hour with no extension; confirm the SDK stops reconnecting after the warning and CPU drops to zero.
Related
Root cause is the missing extension server — see recost-dev/extension#91.
Covers the SDK-side give-up behavior: once the threshold is hit, emit a typed onError and stop spinning.
WebSocket reconnect retries forever, no terminal failure mode
Severity: Low
Affected repos:
middleware-node,middleware-pythonComponent boundary: middleware local transport
Symptom
Both SDKs reconnect to the local WebSocket forever on backoff (capped at 30s). There is no "I've tried for 10 minutes, the server isn't coming back, stop spending CPU on this" mode. Combined with
critical/01(the server doesn't exist), every default-config user's host process spends a small fraction of its CPU on doomed reconnects for its lifetime.Impact
Fix recommendation
After N (say, 20) consecutive failed reconnect attempts, emit a one-time
onError({ kind: "local_unreachable" }), pause reconnect attempts, and only resume on an explicithandle.reconnect()call or process restart. Log a single warning to stderr the first time the threshold is hit.Verification
Related
Root cause is the missing extension server — see recost-dev/extension#91.
Covers the SDK-side give-up behavior: once the threshold is hit, emit a typed onError and stop spinning.