mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-21 03:15:11 +00:00
The /event SSE handler called bus.subscribeAll() which evaluates its inner Effect (InstanceState.get → InstanceRef/Instance.current lookup) inside the body-stream consumer fiber. That fiber does not carry the request handler's ALS/Effect context, so the lookup failed and the stream halted right after server.connected — no message deltas, permission asks, or heartbeats could reach clients. Capture InstanceState.context and InstanceState.workspaceID at handler time and provide them to the subscription stream via Stream.provideService. Fixes #27391. Co-authored-by: James Long <longster@gmail.com>