openai/codex · error · anyhow::Error

code-mode host bulk websocket pairing was abandoned

Error message

code-mode host bulk websocket pairing was abandoned

What it means

Error "code-mode host bulk websocket pairing was abandoned" thrown in openai/codex.

Source

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

    )
    .await
}

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)
    };

View on GitHub (pinned to 339751715c)

When it happens

Trigger: Thrown at codex-rs/code-mode-host/src/lib.rs:132 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/29988100da59e537. Report an issue: GitHub.