{"record":{"id":"f0568010b82af10e","repo":"openai/codex","slug":"code-mode-websocket-messages-must-be-binary-framed","errorCode":null,"errorMessage":"code-mode websocket messages must be binary framed messages","messagePattern":"code-mode websocket messages must be binary framed messages","errorType":"exception","errorClass":"io::Error","httpStatus":null,"severity":"error","filePath":"codex-rs/code-mode-host/src/transport.rs","lineNumber":160,"sourceCode":"\nimpl ConnectionReader {\n    pub(crate) fn from_reader<R>(reader: R) -> Self\n    where\n        R: AsyncRead + Send + Unpin + 'static,\n    {\n        Self::Framed(FramedReader::new(Box::new(reader)))\n    }\n\n    pub(crate) async fn read(&mut self) -> io::Result<Option<ClientToHost>> {\n        match self {\n            Self::Framed(reader) => reader.read().await,\n            Self::WebSocket(reader) => loop {\n                match reader.next().await {\n                    Some(Ok(Message::Binary(bytes))) => {\n                        return EncodedFrame::decode_framed(&bytes).map(Some);\n                    }\n                    Some(Ok(Message::Text(_))) => {\n                        return Err(io::Error::new(\n                            io::ErrorKind::InvalidData,\n                            \"code-mode websocket messages must be binary framed messages\",\n                        ));\n                    }\n                    Some(Ok(Message::Ping(_) | Message::Pong(_))) => {}\n                    Some(Ok(Message::Close(_))) | None => return Ok(None),\n                    Some(Err(err)) => {\n                        return Err(io::Error::other(format!(\n                            \"failed to read code-mode websocket message: {err}\"\n                        )));\n                    }\n                }\n            },\n        }\n    }\n}\n\nimpl ConnectionWriter {","sourceCodeStart":142,"sourceCodeEnd":178,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/code-mode-host/src/transport.rs#L142-L178","documentation":"Error \"code-mode websocket messages must be binary framed messages\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/code-mode-host/src/transport.rs:160 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"339751715c64496cb86246bfb3935f40e309dd3d","analyzedAt":"2026-08-25T05:35:09.876Z","schemaVersion":2},"datasetVersion":"2026-08-25T06:17:31.827Z"}