{"record":{"id":"848d588139b67431","repo":"openai/codex","slug":"unsupported-listen-url-listen-url-expected","errorCode":null,"errorMessage":"unsupported --listen URL `{listen_url}`; expected `ws://IP:PORT`, `grpc://IP:PORT`, `stdio`, or `stdio://`","messagePattern":"unsupported --listen URL `(.+?)`; expected `ws://IP:PORT`, `grpc://IP:PORT`, `stdio`, or `stdio://`","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"codex-rs/code-mode-host/src/transport.rs","lineNumber":236,"sourceCode":"    if let Some(socket_addr) = listen_url.strip_prefix(\"ws://\") {\n        return socket_addr\n            .parse::<SocketAddr>()\n            .map(ListenTransport::WebSocket)\n            .with_context(|| {\n                format!(\"invalid websocket --listen URL `{listen_url}`; expected `ws://IP:PORT`\")\n            });\n    }\n\n    if let Some(socket_addr) = listen_url.strip_prefix(\"grpc://\") {\n        return socket_addr\n            .parse::<SocketAddr>()\n            .map(ListenTransport::Grpc)\n            .with_context(|| {\n                format!(\"invalid gRPC --listen URL `{listen_url}`; expected `grpc://IP:PORT`\")\n            });\n    }\n\n    anyhow::bail!(\n        \"unsupported --listen URL `{listen_url}`; expected `ws://IP:PORT`, `grpc://IP:PORT`, `stdio`, or `stdio://`\"\n    );\n}\n\nasync fn bind_websocket_listener(\n    bind_address: SocketAddr,\n) -> Result<TapIo<TcpListener, impl FnMut(&mut TcpStream) + Send + 'static>> {\n    let listener = TcpListener::bind(bind_address)\n        .await\n        .with_context(|| format!(\"failed to bind code-mode host websocket to {bind_address}\"))?;\n\n    Ok(listener.tap_io(|stream| {\n        if let Err(error) = stream.set_nodelay(/*nodelay*/ true) {\n            warn!(%error, \"failed to enable TCP_NODELAY for code-mode host connection\");\n        }\n    }))\n}\n","sourceCodeStart":218,"sourceCodeEnd":254,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/code-mode-host/src/transport.rs#L218-L254","documentation":"Returned by the code-mode-host listen URL parser when the --listen value is none of ws://IP:PORT, grpc://IP:PORT, stdio, or stdio://. (Malformed addresses within a recognized scheme are reported by the scheme-specific parse errors instead.)","triggerScenarios":"Thrown at codex-rs/code-mode-host/src/transport.rs:236 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use one of the documented --listen forms","Fix the scheme or address syntax (e.g. ws://127.0.0.1:8080)"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"339751715c64496cb86246bfb3935f40e309dd3d","analyzedAt":"2026-08-25T05:35:09.876Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}