openai/codex · error · anyhow::Error
received a second code-mode client hello
Error message
received a second code-mode client hello
What it means
Error "received a second code-mode client hello" thrown in openai/codex.
Source
Thrown at codex-rs/code-mode-host/src/lib.rs:220
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>(())
}
.await;
peer.disconnect();
if tokio::time::timeout(SHUTDOWN_TIMEOUT, state.disconnect())View on GitHub (pinned to 339751715c)
When it happens
Trigger: Thrown at codex-rs/code-mode-host/src/lib.rs:220 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/57b724cff72c20ad.
Report an issue: GitHub.