{"record":{"id":"438a23cf18e9e6b8","repo":"openai/codex","slug":"invalid-noise-channel-message-0","errorCode":null,"errorMessage":"invalid Noise channel message: {0}","messagePattern":"invalid Noise channel message: (.+?)","errorType":"exception","errorClass":"NoiseChannelError","httpStatus":null,"severity":"error","filePath":"codex-rs/exec-server/src/noise_channel.rs","lineNumber":301,"sourceCode":"}\n\nfn ensure_noise_frame_len(\n    frame_len: usize,\n    message: &'static str,\n) -> Result<(), NoiseChannelError> {\n    if frame_len > MAX_MESSAGE_LEN {\n        return Err(NoiseChannelError::InvalidMessage(message));\n    }\n    Ok(())\n}\n\n#[derive(Debug, thiserror::Error)]\npub enum NoiseChannelError {\n    #[error(\"Noise channel key generation failed: {0}\")]\n    KeyGeneration(String),\n    #[error(\"invalid Noise channel public key: {0}\")]\n    InvalidPublicKey(&'static str),\n    #[error(\"invalid Noise channel message: {0}\")]\n    InvalidMessage(&'static str),\n    #[error(\"Noise channel handshake failed: {0}\")]\n    Handshake(String),\n    #[error(\"Noise channel transport failed: {0}\")]\n    Transport(String),\n}\n\nimpl From<clatter::error::HandshakeError> for NoiseChannelError {\n    fn from(error: clatter::error::HandshakeError) -> Self {\n        Self::Handshake(error.to_string())\n    }\n}\n\nimpl From<clatter::error::TransportError> for NoiseChannelError {\n    fn from(error: clatter::error::TransportError) -> Self {\n        Self::Transport(error.to_string())\n    }\n}","sourceCodeStart":283,"sourceCodeEnd":319,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/exec-server/src/noise_channel.rs#L283-L319","documentation":"Generic guard raised by ensure_noise_frame_len (and message decode paths) when a Noise frame/message violates the protocol constraints — here, frame_len exceeding MAX_MESSAGE_LEN — or a payload fails Noise decrypt/decompose.","triggerScenarios":"Thrown at codex-rs/exec-server/src/noise_channel.rs:301 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Reduce the outgoing message below MAX_MESSAGE_LEN by chunking","Confirm both endpoints run matching Noise protocol versions/frame limits","Treat it as a peer bug or corruption if inbound; drop the connection"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"339751715c64496cb86246bfb3935f40e309dd3d","analyzedAt":"2026-08-25T05:35:09.876Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}