Skip to content

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

Open

Description

@CannonRS

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

Activity

  1. opencodejr commented on Oct 28, 2026

    @opencodejr
    Contributor

    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.

    Related issues and PRs:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions