You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The WebSocket server transport ignores binary frames: receive() in acp/ws/server.py skips any event without text. A client that sends newline-delimited JSON as binary frames (the TypeScript SDK's ndjson stream over a WebSocket bridge does this) never gets an answer to initialize.
Expected: accept binary frames as UTF-8 newline-delimited JSON as well, possibly several records per frame.
All messages are WebSocket text frames containing JSON-RPC. Binary frames are ignored.
So each JSON-RPC message has to go out as its own text frame. NDJSON byte chunks sent as binary frames won't work, and neither would accepting them here: a chunk can hold several messages or only part of one. The fix belongs in the bridge, something like ws.send(JSON.stringify(message)) once per message, instead of forwarding the stdio byte stream.
The silent drop is a fair complaint, though. #166 keeps ignoring binary frames but logs a warning on the first one, so the next person who hits this sees the cause right away. Closing this as working per spec.
Activity
frostming commentedon Oct 12, 2026
Thanks for the report, @ayushin.
This is intentional. The Streamable HTTP & WebSocket transport RFD says:
So each JSON-RPC message has to go out as its own text frame. NDJSON byte chunks sent as binary frames won't work, and neither would accepting them here: a chunk can hold several messages or only part of one. The fix belongs in the bridge, something like
ws.send(JSON.stringify(message))once per message, instead of forwarding the stdio byte stream.The silent drop is a fair complaint, though. #166 keeps ignoring binary frames but logs a warning on the first one, so the next person who hits this sees the cause right away. Closing this as working per spec.
fix(ws): warn when the server ignores binary frames (#166)