SSE functionality on REST API with opencode serve? [Does it exist?] #9222

Closed
opened 2026-02-16 18:11:56 -05:00 by yindo · 3 comments
Owner

Originally created by @davidbernat on GitHub (Feb 12, 2026).

Originally assigned to: @thdxr on GitHub.

Description

My shop has had persistent problems getting basic REST APIs to return without errors using opencode serve.
This problem is remedial in its core and impacts basic reusable endpoints such as chat and session.

Those are in REST API mode, in which the entire OpenCode operation is returned in one response, a list of parts, each of which is one JSON of one set of a sequence of event types.

The docs mention that SSE polls is available as an endpoint, with no other notes. Presumably, an SSE model would respond with one event every time one part, one JSON of one of the set of event types, occurs in the OpenCode operation. This is clearly available in the TUI as the graphical interface updates with each new part.

However, we tried, and tried, and no endpoints seemed to accept SSE. Is this intended? Is this permanent? We are confused, because 1. we are experienced enough to get robust performance out of REST APIs, which are showing stochastic behavior with opencode serve, and 2. we know the API can handle SSE because we see it with the TUI.

So, we are trying to get to the fastest possible go-model for enterprise development with our current tool set. It leaves us wondering why, if TUI operation is so robust with SSE, this would be excluded from the same endpoints. This is the kind of "non-parity" of performance which plagues our enthusiasm for OpenCode and startups period.

Would love to be inside your company to help you build something at the application layer. Please decide on that.

Have a pleasant tomorrow. We are finally done here tonight.

Plugins

No response

OpenCode version

No response

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Originally created by @davidbernat on GitHub (Feb 12, 2026). Originally assigned to: @thdxr on GitHub. ### Description My shop has had persistent problems getting basic REST APIs to return without errors using `opencode serve`. This problem is remedial in its core and impacts basic reusable endpoints such as `chat` and `session`. Those are in REST API mode, in which the entire OpenCode operation is returned in one response, a list of parts, each of which is one JSON of one set of a sequence of event types. The docs mention that SSE polls is available as an endpoint, with no other notes. Presumably, an SSE model would respond with one event every time one part, one JSON of one of the set of event types, occurs in the OpenCode operation. This is clearly available in the TUI as the graphical interface updates with each new part. However, we tried, and tried, and no endpoints seemed to accept SSE. Is this intended? Is this permanent? We are confused, because 1. we are experienced enough to get robust performance out of REST APIs, which are showing stochastic behavior with opencode serve, and 2. we know the API can handle SSE because we see it with the TUI. So, we are trying to get to the fastest possible go-model for enterprise development with our current tool set. It leaves us wondering why, if TUI operation is so robust with SSE, this would be excluded from the same endpoints. This is the kind of "non-parity" of performance which plagues our enthusiasm for OpenCode and startups period. Would love to be inside your company to help you build something at the application layer. Please decide on that. Have a pleasant tomorrow. We are finally done here tonight. ### Plugins _No response_ ### OpenCode version _No response_ ### Steps to reproduce _No response_ ### Screenshot and/or share link _No response_ ### Operating System _No response_ ### Terminal _No response_
yindo added the bugdocsneeds:compliance labels 2026-02-16 18:11:56 -05:00
yindo closed this issue 2026-02-16 18:11:56 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Feb 12, 2026):

This issue doesn't fully meet our contributing guidelines.

What needs to be fixed:

  • Missing template: This issue is labeled as a bug but doesn't follow the Bug Report template structure. Required fields are empty:

    • OpenCode version: No response
    • Steps to reproduce: No response
    • Operating System: No response
    • Terminal: No response
  • Unclear scope: The issue conflates a question ("Is SSE available?"), a potential feature request (wanting SSE on REST API), and general feedback. Please focus on one specific, actionable issue.

  • Incomplete bug context: If reporting a bug, please provide clear, reproducible steps. The current description lacks specifics about which endpoints were tried and what behavior was observed.

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

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

@github-actions[bot] commented on GitHub (Feb 12, 2026): <!-- issue-compliance --> This issue doesn't fully meet our [contributing guidelines](../blob/dev/CONTRIBUTING.md). **What needs to be fixed:** - **Missing template**: This issue is labeled as a bug but doesn't follow the Bug Report template structure. Required fields are empty: - OpenCode version: _No response_ - Steps to reproduce: _No response_ - Operating System: _No response_ - Terminal: _No response_ - **Unclear scope**: The issue conflates a question ("Is SSE available?"), a potential feature request (wanting SSE on REST API), and general feedback. Please focus on one specific, actionable issue. - **Incomplete bug context**: If reporting a bug, please provide clear, reproducible steps. The current description lacks specifics about which endpoints were tried and what behavior was observed. Please edit this issue to address the above within **2 hours**, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know.
Author
Owner

@mohamedbouddi7777-dev commented on GitHub (Feb 12, 2026):

Okay thanks for example Free website

في الجمعة، ١٣ فبراير ٢٠٢٦، ٠٤:١٩ github-actions[bot] <
@.***> كتب:

github-actions[bot] left a comment (anomalyco/opencode#13416)
https://github.com/anomalyco/opencode/issues/13416#issuecomment-3894586407

This issue doesn't fully meet our contributing guidelines
http://../blob/dev/CONTRIBUTING.md.

What needs to be fixed:

Missing template: This issue is labeled as a bug but doesn't follow
the Bug Report template structure. Required fields are empty:

  • OpenCode version: No response
    • Steps to reproduce: No response
    • Operating System: No response
    • Terminal: No response

Unclear scope: The issue conflates a question ("Is SSE available?"),
a potential feature request (wanting SSE on REST API), and general
feedback. Please focus on one specific, actionable issue.

Incomplete bug context: If reporting a bug, please provide clear,
reproducible steps. The current description lacks specifics about which
endpoints were tried and what behavior was observed.

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

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


Reply to this email directly, view it on GitHub
https://github.com/anomalyco/opencode/issues/13416#issuecomment-3894586407,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/B2DFN3REBMMCRKEO7BH22SL4LU7EPAVCNFSM6AAAAACU7I555KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTQOJUGU4DMNBQG4
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

@mohamedbouddi7777-dev commented on GitHub (Feb 12, 2026): Okay thanks for example Free website في الجمعة، ١٣ فبراير ٢٠٢٦، ٠٤:١٩ github-actions[bot] < ***@***.***> كتب: > *github-actions[bot]* left a comment (anomalyco/opencode#13416) > <https://github.com/anomalyco/opencode/issues/13416#issuecomment-3894586407> > > This issue doesn't fully meet our contributing guidelines > <http://../blob/dev/CONTRIBUTING.md>. > > *What needs to be fixed:* > > - > > *Missing template*: This issue is labeled as a bug but doesn't follow > the Bug Report template structure. Required fields are empty: > - OpenCode version: *No response* > - Steps to reproduce: *No response* > - Operating System: *No response* > - Terminal: *No response* > - > > *Unclear scope*: The issue conflates a question ("Is SSE available?"), > a potential feature request (wanting SSE on REST API), and general > feedback. Please focus on one specific, actionable issue. > - > > *Incomplete bug context*: If reporting a bug, please provide clear, > reproducible steps. The current description lacks specifics about which > endpoints were tried and what behavior was observed. > > Please edit this issue to address the above within *2 hours*, or it will > be automatically closed. > > If you believe this was flagged incorrectly, please let a maintainer know. > > — > Reply to this email directly, view it on GitHub > <https://github.com/anomalyco/opencode/issues/13416#issuecomment-3894586407>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/B2DFN3REBMMCRKEO7BH22SL4LU7EPAVCNFSM6AAAAACU7I555KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTQOJUGU4DMNBQG4> > . > You are receiving this because you are subscribed to this thread.Message > ID: ***@***.***> >
Author
Owner

@github-actions[bot] commented on GitHub (Feb 13, 2026):

This issue has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.

Feel free to open a new issue that follows our issue templates.

@github-actions[bot] commented on GitHub (Feb 13, 2026): This issue has been automatically closed because it was not updated to meet our [contributing guidelines](../blob/dev/CONTRIBUTING.md) within the 2-hour window. Feel free to open a new issue that follows our issue templates.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9222