Race observed on first turn: ClaudePlugin emits notifications/claude/channel before Claude Code finishes registering the channel handler internally. Claude logs "MCP server synthesis: Channel notifications registered" ~25ms AFTER hello_ack arrives. Notifications that arrive earlier are silently dropped — observed empty session, no turn, curl hangs until timeout. Fix: on first `inbound` frame after WS hello, wait 800ms before emitting the MCP notification. Subsequent inbounds skip the wait. End-to-end verified twice on laptop. Cold-start ~10s, hot path 2-3s.
6.6 KiB
6.6 KiB