anomalyco / anomalyco/opencode

Global event stream reconnects on a fixed 250ms timer with no backoff

Open
#48,014 0 comments 0 reactions 1 assignee View on GitHub

@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
  1. Start the app so the global event stream is subscribed.
  2. Stop the backend or cut the connection for > 1 second.
  3. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.