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
Dose APIs of opencode support session-level SSE event listener? #7451
It seems that I just noticed the APIs offer both global-level and project-level event listeners, such as /global/event and /event for subscribing to server-sent events (SSE). 
So I was wondering:
Is there a way to implement a workflow where a user sends an asynchronous prompt (e.g., via POST /session/{id}/prompt_async), and a backend worker/thread can directly listen to session-level events, filter events for that specific session ID, and then push the real-time generated updates back to the corresponding user’s session?
Specifically:
• Can the server or client maintain a long-running listener on /event (project level) or /global/event (global level) and, for each incoming SSE event, dispatch it only to the relevant session based on sessionID?
• Is there an established pattern for routing those session events back to the correct user instance (for example via WebSocket, callback, or SSE client)?
• Is this supported or recommended by the SDK or server design for real-time interactive usage?
Activity
thdxr commentedon Mar 25, 2026
To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.