You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Global event stream reconnects on a fixed 250ms timer with no backoff #48014
The app's global event stream reconnects after every failure with the same fixed RECONNECT_DELAY_MS (250 ms) — there is no back-off. When the server is briefly unavailable (restart, proxy blip, network drop), the client retries in a tight loop: a long outage produces hundreds of rapid attempts, keeps the CPU busy and spams the server with connections, even though a slow cadence would work just as well for recovery.
Plugins
N/A
OpenCode version
dev (current upstream/dev)
Steps to reproduce
Start the app so the global event stream is subscribed.
Stop the backend or cut the connection for > 1 second.
Observe the client reconnect loop: it retries every 250 ms with no growth in the delay.
Thanks for the report! You're asking for the app's global event stream to back off between reconnect attempts instead of retrying on a fixed delay, so a long server outage doesn't turn into a steady stream of attempts.
One note on current dev: the 250 ms RECONNECT_DELAY_MS you mention was in packages/app/src/context/server-sdk.tsx, which the v2 client refactor removed. The event stream now goes through createClientConnection in packages/client/src/solid/connection.ts. It waits a fixed 1 s (reconnectDelay = 1_000) after each failure, still with no backoff. That fixed delay is intended, so we're tracking this as an improvement rather than a bug. Maintainers will consider it.
Activity
opencodejr commentedon Oct 28, 2026
Thanks for the report! You're asking for the app's global event stream to back off between reconnect attempts instead of retrying on a fixed delay, so a long server outage doesn't turn into a steady stream of attempts.
One note on current
dev: the 250 msRECONNECT_DELAY_MSyou mention was inpackages/app/src/context/server-sdk.tsx, which the v2 client refactor removed. The event stream now goes throughcreateClientConnectioninpackages/client/src/solid/connection.ts. It waits a fixed 1 s (reconnectDelay = 1_000) after each failure, still with no backoff. That fixed delay is intended, so we're tracking this as an improvement rather than a bug. Maintainers will consider it.Related issues and PRs:
server-sdk.tsx