mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-22 20:05:23 +00:00
The TUI's useEvent filter returned early in the workspace branch when the inbound event's workspace did not match the TUI's active workspace — including the common case where event.workspace was undefined because the session has no workspaceID. The early return meant directory-scoped events from external POSTs (web UI, SDK, curl) targeting a session running in the same directory were silently dropped, even though the server published them correctly with the right directory. Treat events without a workspace label as directory-scoped and fall through to the directory comparator so the TUI re-renders them. Also adds an explicit return after the global-event handler so a global event isn't forwarded twice. Test cases (a)-(c) in httpapi-promptasync-events.test.ts now all forward; (d) keeps cross-workspace events dropped. https://claude.ai/code/session_011VwDFG5W32dnu1qnT3SGr1