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
The instance event SSE handler creates an eager unbounded Queue.unbounded<EventV2.Payload>() for each subscriber and offers every full event payload into it. A slow or stalled subscriber can retain unlimited high-volume message.part.updated payloads.
Source: packages/opencode/src/server/routes/instance/httpapi/handlers/event.ts. Session.updatePart() publishes a full cloned part on every update.
Expected: each subscriber has a hard event/byte bound. Overflow disconnects explicitly or uses a safe sliding/coalescing policy. Cancellation always releases retained payloads, and terminal events are never silently lost.
This was found during a V8 OOM investigation. It is a confirmed unbounded source path, but it was not proven as that incident's heap owner because one saturated runtime sample had no live subscriber.
Plugins
@loreai/opencode
OpenCode version
Current v2 development source
Steps to reproduce
Open an instance SSE subscription.
Stop or severely throttle reads from the response.
Generate sustained message.part.updated events with large part payloads.
Observe that the subscriber queue grows without a configured event or byte limit until disconnect.
A regression should hold one subscriber stalled, publish sustained updates, assert bounded retained events/bytes, then cancel and assert full release.
Screenshot and/or share link
Not applicable; this is a server-side queue retention path.
The issue does not use one of the three required templates (Bug Report, Feature Request, or Question). Please re-submit using the appropriate template — in this case, the Bug Report template, which requires a Description field and reproduction context.
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:
Thanks for updating the issue! It now looks good and follows the contributing guidelines. We appreciate the detailed bug report with reproduction steps and context.
Activity
github-actions commentedon Aug 26, 2026
This issue doesn't fully meet our contributing guidelines.
What needs to be fixed:
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.
github-actions commentedon Aug 26, 2026
Thanks for updating the issue! It now looks good and follows the contributing guidelines. We appreciate the detailed bug report with reproduction steps and context.
fix(server): bound SSE subscriber queues; cap question-stall suspension