openai/codex · error · NoiseChannelError
invalid Noise channel message
Error message
invalid Noise channel message: {0} What it means
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.
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
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at codex-rs/exec-server/src/noise_channel.rs:301 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of openai/codex@339751715c (2026-08-25).
Data as JSON: /api/errors/438a23cf18e9e6b8.
Report an issue: GitHub.
Appendix: source
Thrown at codex-rs/exec-server/src/noise_channel.rs:301
}
fn ensure_noise_frame_len(
frame_len: usize,
message: &'static str,
) -> Result<(), NoiseChannelError> {
if frame_len > MAX_MESSAGE_LEN {
return Err(NoiseChannelError::InvalidMessage(message));
}
Ok(())
}
#[derive(Debug, thiserror::Error)]
pub enum NoiseChannelError {
#[error("Noise channel key generation failed: {0}")]
KeyGeneration(String),
#[error("invalid Noise channel public key: {0}")]
InvalidPublicKey(&'static str),
#[error("invalid Noise channel message: {0}")]
InvalidMessage(&'static str),
#[error("Noise channel handshake failed: {0}")]
Handshake(String),
#[error("Noise channel transport failed: {0}")]
Transport(String),
}
impl From<clatter::error::HandshakeError> for NoiseChannelError {
fn from(error: clatter::error::HandshakeError) -> Self {
Self::Handshake(error.to_string())
}
}
impl From<clatter::error::TransportError> for NoiseChannelError {
fn from(error: clatter::error::TransportError) -> Self {
Self::Transport(error.to_string())
}
}View on GitHub (pinned to 339751715c)