Bug Description
The /event SSE endpoint in opencode 1.14.48 does not forward any internal events to connected clients. The endpoint accepts connections and sends server.connected, but no subsequent events (message.part.updated, message.updated, session.status, session.idle, etc.) are ever delivered.
This worked correctly in v1.14.40 and is broken in v1.14.48.
Environment
- OS: Linux x86_64 (Rocky Linux 9)
- OpenCode version: 1.14.48 (
opencode serve --hostname 127.0.0.1 --port 0)
- Connection: direct localhost (no proxy, no tailscale, no reverse proxy)
- Client: curl (also reproduced with Go
net/http client)
Steps to Reproduce
# Terminal 1: Start the server
opencode serve --hostname 127.0.0.1 --port 0
# Terminal 2: Connect to SSE event stream
curl -sN "http://127.0.0.1:PORT/event" -H "Accept: text/event-stream"
# Terminal 3: Create session + send prompt
SESSION_ID=$(curl -s http://127.0.0.1:PORT/session -H "Content-Type: application/json" -d "{}" | python3 -c "import json,sys;print(json.load(sys.stdin)['id'])")
curl -s http://127.0.0.1:PORT/session/${SESSION_ID}/prompt_async -H "Content-Type: application/json" -d '{"parts":[{"type":"text","text":"say hello"}]}'
Expected Behavior
Terminal 2 receives SSE events as the prompt is processed:
data: {"type":"server.connected","properties":{}}
data: {"type":"message.updated","properties":{...}}
data: {"type":"message.part.updated","properties":{...}}
data: {"type":"session.idle","properties":{...}}
Actual Behavior
Terminal 2 only receives the initial connection event, nothing else:
data: {"id":"evt_...","type":"server.connected","properties":{}}
No further events appear, even after waiting several minutes.
Evidence
- Server logs confirm events are published internally:
INFO service=bus type=message.part.delta publishing
INFO service=bus type=message.part.updated publishing
INFO service=bus type=session.idle publishing
-
prompt_async returns 204 — prompt was accepted and processed.
-
Same workflow on v1.14.40 works correctly — SSE events arrive in real-time.
-
Session-specific /session/{id}/event returns HTML (web UI), not SSE — no alternative endpoint.
Impact
Breaks all integrations relying on /event SSE for real-time event delivery. Only workaround is downgrading to v1.14.40.
Related Issues
Bug Description
The
/eventSSE endpoint in opencode 1.14.48 does not forward any internal events to connected clients. The endpoint accepts connections and sendsserver.connected, but no subsequent events (message.part.updated, message.updated, session.status, session.idle, etc.) are ever delivered.This worked correctly in v1.14.40 and is broken in v1.14.48.
Environment
opencode serve --hostname 127.0.0.1 --port 0)net/httpclient)Steps to Reproduce
Expected Behavior
Terminal 2 receives SSE events as the prompt is processed:
Actual Behavior
Terminal 2 only receives the initial connection event, nothing else:
No further events appear, even after waiting several minutes.
Evidence
prompt_asyncreturns 204 — prompt was accepted and processed.Same workflow on v1.14.40 works correctly — SSE events arrive in real-time.
Session-specific
/session/{id}/eventreturns HTML (web UI), not SSE — no alternative endpoint.Impact
Breaks all integrations relying on
/eventSSE for real-time event delivery. Only workaround is downgrading to v1.14.40.Related Issues