openai/codex · error · anyhow::Error

timed out pairing code-mode host bulk websocket

Error message

timed out pairing code-mode host bulk websocket

What it means

Error "timed out pairing code-mode host bulk websocket" thrown in openai/codex.

Source

Thrown at codex-rs/code-mode-host/src/lib.rs:135

async fn run_connection(
    mut reader: ConnectionReader,
    mut writer: ConnectionWriter,
    limits: Arc<HostLimits>,
    bulk_connections: Option<BulkConnectionRegistry>,
) -> Result<()> {
    let negotiated = negotiate(&mut reader, &mut writer, bulk_connections.as_ref()).await?;
    let bulk_connection = match negotiated {
        NegotiatedConnection::Rejected => return Ok(()),
        NegotiatedConnection::Single => None,
        NegotiatedConnection::Dual(mut registration) => {
            match tokio::time::timeout(BULK_PAIRING_TIMEOUT, registration.receive()).await {
                Ok(Ok(connection)) => Some(connection),
                Ok(Err(_)) => {
                    anyhow::bail!("code-mode host bulk websocket pairing was abandoned");
                }
                Err(_) => {
                    anyhow::bail!("timed out pairing code-mode host bulk websocket");
                }
            }
        }
    };
    let (mut bulk_reader, bulk_writer) = match bulk_connection {
        Some(connection) => (Some(connection.reader), Some(connection.writer)),
        None => (None, None),
    };
    let (outgoing_tx, outgoing_rx) = mpsc::channel::<EncodedFrame>(OUTGOING_CHANNEL_CAPACITY);
    let (bulk_tx, bulk_rx) = if bulk_writer.is_some() {
        let (sender, receiver) = mpsc::channel::<EncodedFrame>(MAX_PENDING_DELEGATE_CALLS);
        (Some(sender), Some(receiver))
    } else {
        (None, None)
    };
    let peer = match bulk_tx {
        Some(sender) => Arc::new(HostPeer::new(outgoing_tx).with_bulk_sender(sender)),
        None => Arc::new(HostPeer::new(outgoing_tx)),

View on GitHub (pinned to 339751715c)

When it happens

Trigger: Thrown at codex-rs/code-mode-host/src/lib.rs:135 when the library encounters an invalid state.

Common situations: See trigger scenarios.

Understand the failure class


AI-assisted analysis of openai/codex@339751715c (2026-08-25). Data as JSON: /api/errors/3dcba4c3aa30af59. Report an issue: GitHub.