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
{{ message }}
Repository navigation
[FEATURE]: Support session-scoped streaming responses for message submission #17020
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Currently, there is no efficient way to receive real-time updates for a specific session without significant overhead. The existing two methods are:
POST /session/:id/message: Synchronous and blocking. This is unsuitable for production as it risks timeouts and consumes server-side threads for long-running tasks.
POST /session/:id/prompt_async: Asynchronous (204), but results are broadcasted via the global /event endpoint. This forces the client to either filter a high-volume stream of all sessions' data or fallback to inefficient polling via GET /session/:id/message.
The Proposal:
I suggest introducing a Stream API (Server-Sent Events) that allows users to receive updates for a specific session directly.
Desired Behavior:
A new endpoint (e.g., POST /session/:id/message/stream or GET /session/:id/events) that returns text/event-stream.
The stream should only contain events relevant to the specific :id.
Alternatively, allow the POST request to return a stream directly as the response body.
Why this matters:
Performance: Reduces client-side CPU usage (no need to filter global noise).
Scalability: Eliminates the need for frequent polling.
UX: Enables low-latency, "typewriter" style responses for a better user experience.
This issue might be a duplicate of existing issues. Please check:
[FEATURE]:Support sessionID Filter for SSE Event Subscription #9650: Requests a sessionID filter for the SSE /event endpoint to allow clients to subscribe to events for specific sessions only — essentially the same goal of scoping streaming responses to a single session rather than receiving all global events.
Activity
github-actions commentedon Mar 11, 2026
This issue might be a duplicate of existing issues. Please check:
sessionIDFilter for SSE Event Subscription #9650: Requests asessionIDfilter for the SSE/eventendpoint to allow clients to subscribe to events for specific sessions only — essentially the same goal of scoping streaming responses to a single session rather than receiving all global events.github-actions commentedon Jul 4, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.