{"record":{"id":"2a63173b931d0c5f","repo":"openai/codex","slug":"code-mode-client-sent-a-message-on-the-wrong-webso","errorCode":null,"errorMessage":"code-mode client sent a message on the wrong websocket lane","messagePattern":"code-mode client sent a message on the wrong websocket lane","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"codex-rs/code-mode-host/src/lib.rs","lineNumber":216,"sourceCode":"                message = reader.read() => (\n                    message.context(\"failed to read code-mode client control message\")?,\n                    TransportLane::Control,\n                ),\n                message = async {\n                    match &mut bulk_reader {\n                        Some(reader) => reader.read().await,\n                        None => Ok(None),\n                    }\n                }, if bulk_reader.is_some() => (\n                    message.context(\"failed to read code-mode client bulk message\")?,\n                    TransportLane::Bulk,\n                ),\n            };\n            let Some(message) = message else {\n                break;\n            };\n            if bulk_reader.is_some() && !message.allows_transport_lane(lane) {\n                anyhow::bail!(\"code-mode client sent a message on the wrong websocket lane\");\n            }\n            match message {\n                ClientToHost::ClientHello(_) => {\n                    anyhow::bail!(\"received a second code-mode client hello\");\n                }\n                ClientToHost::Request { id, request } => {\n                    state.spawn_request(id, request)?;\n                }\n                ClientToHost::CancelRequest { id } => {\n                    state.cancel_request(id);\n                }\n                ClientToHost::DelegateResponse { id, result } => {\n                    peer.complete(id, result.into_result()).await;\n                }\n            }\n        }\n        Ok::<(), anyhow::Error>(())\n    }","sourceCodeStart":198,"sourceCodeEnd":234,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/code-mode-host/src/lib.rs#L198-L234","documentation":"Error \"code-mode client sent a message on the wrong websocket lane\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/code-mode-host/src/lib.rs:216 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"}