openai/codex · error · anyhow::Error
code-mode client sent a message on the wrong websocket lane
Error message
code-mode client sent a message on the wrong websocket lane
What it means
Error "code-mode client sent a message on the wrong websocket lane" thrown in openai/codex.
Source
Thrown at codex-rs/code-mode-host/src/lib.rs:216
message = reader.read() => (
message.context("failed to read code-mode client control message")?,
TransportLane::Control,
),
message = async {
match &mut bulk_reader {
Some(reader) => reader.read().await,
None => Ok(None),
}
}, if bulk_reader.is_some() => (
message.context("failed to read code-mode client bulk message")?,
TransportLane::Bulk,
),
};
let Some(message) = message else {
break;
};
if bulk_reader.is_some() && !message.allows_transport_lane(lane) {
anyhow::bail!("code-mode client sent a message on the wrong websocket lane");
}
match message {
ClientToHost::ClientHello(_) => {
anyhow::bail!("received a second code-mode client hello");
}
ClientToHost::Request { id, request } => {
state.spawn_request(id, request)?;
}
ClientToHost::CancelRequest { id } => {
state.cancel_request(id);
}
ClientToHost::DelegateResponse { id, result } => {
peer.complete(id, result.into_result()).await;
}
}
}
Ok::<(), anyhow::Error>(())
}View on GitHub (pinned to 339751715c)
When it happens
Trigger: Thrown at codex-rs/code-mode-host/src/lib.rs:216 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/2a63173b931d0c5f.
Report an issue: GitHub.