anomalyco / anomalyco/opencode
Global event stream reconnects on a fixed 250ms timer with no backoff
Open
@kitlangton is already working on this.
Since Sep 8, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
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.
Screenshot and/or share link
N/A
Operating System
Platform-independent
Terminal
N/A (app / desktop)
Related / duplicate check
- #26416 (idle CPU on macOS) can be aggravated by a tight reconnect loop.
- #38458 (SSE stream closes) is a different root cause (mid-turn closure), not this retry cadence.
- No issue covers the missing backoff itself.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.