Skip to content

SSE /event endpoint does not forward events to clients in v1.14.48 (regression from v1.14.40) #26866

Description

@Alice-space

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

  1. 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
  1. prompt_async returns 204 — prompt was accepted and processed.

  2. Same workflow on v1.14.40 works correctly — SSE events arrive in real-time.

  3. 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

Activity

github-actions commented on May 11, 2026

@github-actions
Contributor

This issue might be a duplicate of existing issues. Please check:

Please review those issues and comment there if you can confirm or add additional context, to help consolidate the investigation.

Canahmetozguven commented on May 13, 2026

@Canahmetozguven

Confirming same bug on Arch Linux (cachyos) with opencode-ai 1.14.46, bun 1.3.13.

Symptoms match exactly: ACP clients (OpenChamber) hang after ~20-30 messages. Server logs show events publishing to internal bus but client SSE stream receives nothing after server.connected.

Also confirmed: v1.14.41 binary itself crashes on our system (segfault in bun executable) — so a clean rollback to 1.14.41 isn't directly available for us. This bug is blocking all ACP client integrations.

rekram1-node commented on May 14, 2026

@rekram1-node
Collaborator

other issue has more activity closing in favor of it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions