Answer: Streaming endpoints return Effect Stream values; you subscribe with opencode.events.subscribe() and pipe it through Stream.runForEach to handle each event, forking the consumer in the host Scope when it should run in the background. Status: Confirmed Entry: tool/opencode/integrations/stream-events-effect Revision: 2 Digest: sha256:21c4c844aa5fd1bb (changes whenever the content changes) Timeline: Created: 2026-11-14T13:42:26Z Last changed: 2026-11-18T13:38:31Z (Logging example: — → Effect .logInfo ( "OpenCode event" , { type : event .type })) Last verified: 2026-11-20T13:44:53Z Next check: 2026-11-21T13:44:53Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of Streaming return type | Effect Stream | [1] | 2026-11-20 Event handler | Stream .runForEach | [1] | 2026-11-20 Background execution | Effect .forkScoped | [1] | 2026-11-20 Logging example | Effect .logInfo ( "OpenCode event" , { type : event .type }) | [1] | 2026-11-20 Sources: [1] opencode. "Effect SDK | OpenCode". https://opencode.ai/docs/build/sdk/effect/ Role: primary. Accessed: 2026-11-20T13:44:53Z Quote: "Streaming endpoints return Effect Stream values." (Supports: Streaming return type) Quote: "Stream .runForEach ((event) =>" (Supports: Event handler) Quote: "Effect .forkScoped , )" (Supports: Background execution) Quote: "Effect .logInfo ( "OpenCode event" , { type : event .type })" (Supports: Logging example) Snapshot SHA-256: 6069a62030f0e6b38d3265b7d480856e936f1fc77bbd61df6a0714fa66c8ccd9 (captured 2026-11-18T13:38:31Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-18T13:38:31Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T13:44:53Z. No independent second source is configured for this entry Last successful check: 2026-11-20T13:44:53Z Last attempt: 2026-11-20T13:44:53Z Notes and limitations: Extracted automatically from a single official source (section "Stream events"). Related: https://latestn.com/tool/opencode/integrations/subscribe-rpc-events How do I subscribe to RPC events in an opencode Effect plugin? https://latestn.com/tool/opencode/integrations/subscribe-rpc-events-2 How do I subscribe to opencode RPC events? https://latestn.com/tool/opencode/integrations/supported-harnesses Which coding agent harnesses does opencode Console support? https://latestn.com/tool/opencode/integrations/run-opencode-as-acp-agent-in-zed How do I run opencode as an ACP agent in Zed? https://latestn.com/tool/opencode/integrations/server-info-endpoint How do I get opencode server info via the API? https://latestn.com/tool/opencode/integrations/stream-events-2 How do I stream events from the opencode SDK? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-18T13:38:31Z | changed | Logging example: — → Effect .logInfo ( "OpenCode event" , { type : event .type }) | [1] 2026-11-18T13:38:31Z | changed | Background execution: — → Effect .forkScoped | [1] 2026-11-18T13:38:31Z | changed | Event handler: — → Stream .runForEach | [1] 2026-11-18T13:38:31Z | changed | Streaming return type: — → Effect Stream | [1] 2026-11-18T13:38:31Z | changed | Fork in Scope: Effect .forkScoped → — | [1] 2026-11-18T13:38:31Z | changed | Stream consumer: Stream .runForEach → — | [1] 2026-11-18T13:38:31Z | changed | Return type: Effect Stream → — | [1] 2026-11-14T13:42:26Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/opencode/integrations/stream-events-effect/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/opencode/integrations/stream-events-effect POST: https://latestn.com/dispute/tool/opencode/integrations/stream-events-effect with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/opencode/integrations/stream-events-effect?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I stream events from opencode using the Effect SDK? Revision 2, last verified 2026-11-20T13:44:53Z. https://latestn.com/tool/opencode/integrations/stream-events-effect (accessed 2026-11-21T09:50:43Z). @misc{LatestN_tool_opencode_integrations_stream_events_effect_r2, title = {How do I stream events from opencode using the Effect SDK?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/opencode/integrations/stream-events-effect}}, note = {Revision 2; digest sha256:21c4c844aa5fd1bb; last verified 2026-11-20T13:44:53Z; accessed 2026-11-21T09:50:43Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/opencode/integrations/stream-events-effect