Skip to content

Bug: /global/event SSE stream loses events on reconnect (no Last-Event-ID support) #25657

Closed as not planned

Description

@pasta-paul

Description

Long-running tasks (multi-agent runs emitting frequent events) silently lose UI updates when the SSE stream drops — proxy idle, browser tab backgrounded, network blip. The server keeps working, the client never catches up.

The browser's native EventSource sends Last-Event-ID automatically on reconnect, but /global/event ignores it and resubscribes fresh. Events emitted during the gap are lost. UI ends up out of sync with server state.

Plugins

oh-my-openagent

OpenCode version

dev (HEAD as of 2026-05-03; reproduces on v1.14.33 too — same code path)

Steps to reproduce

  1. Open the web UI; start an agent task that emits frequent events (any subagent run will do).
  2. Throttle the network in DevTools or background the tab for ~30s.
  3. Restore. UI is missing every event from the gap window — agents continued running on the server, the client just doesn't know about it.

Screenshot and/or share link

n/a — server-side behaviour, observable in any browser hitting /global/event.

Operating System

Linux x64 (server) / macOS 15 (client)

Terminal

n/a — browser-based UI


Note re: #19584 — that issue is about an after_seq query parameter and replay-error semantics, on a different surface. This one is specifically about Last-Event-ID (the standard EventSource reconnect header) being ignored on /global/event. I have a PR ready (#25658) that adds a 1024-entry ring buffer + Last-Event-ID honoring. The same pattern can be applied to /event (instance) in a follow-up.

Activity

  1. github-actions commented on May 4, 2026

    @github-actions
    Contributor

    This issue doesn't fully meet our contributing guidelines.

    What needs to be fixed:

    • The issue does not use our Bug Report template. Please include the required fields: OpenCode version, Operating System, and Terminal.

    Please edit this issue to address the above within 2 hours, or it will be automatically closed.


    This issue might be a duplicate of existing issues. Please check:

    If you believe this was flagged incorrectly, please let a maintainer know.

  2. added
    needs:complianceThis means the issue will auto-close after 2 hours.
    and removed
    needs:complianceThis means the issue will auto-close after 2 hours.
    on May 4, 2026
  3. github-actions commented on May 4, 2026

    @github-actions
    Contributor

    Thanks for updating the issue! It now meets our contributing guidelines. Your bug report is clear and well-structured with good reproduction steps and system information.

  4. github-actions commented on Jul 4, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

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