{"record":{"id":"6cc86645ef12bc51","repo":"openai/codex","slug":"handshake-succeeded-but-server-info-was-missing","errorCode":null,"errorMessage":"handshake succeeded but server info was missing","messagePattern":"handshake succeeded but server info was missing","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"codex-rs/rmcp-client/src/rmcp_client.rs","lineNumber":618,"sourceCode":"                    None => return Err(anyhow!(\"client already initializing\")),\n                },\n                ClientState::Ready { .. } => return Err(anyhow!(\"client already initialized\")),\n                ClientState::Closed => return Err(anyhow!(\"MCP client is shut down\")),\n            }\n        };\n\n        let (service, oauth_persistor) = self\n            .connect_pending_transport_with_initialize_retries(\n                pending_transport,\n                client_service.clone(),\n                timeout,\n            )\n            .await?;\n\n        let initialize_result_rmcp = service\n            .peer()\n            .peer_info()\n            .ok_or_else(|| anyhow!(\"handshake succeeded but server info was missing\"))?;\n        let initialize_result = initialize_result_rmcp.as_ref().clone();\n\n        {\n            let mut initialize_context = self.initialize_context.lock().await;\n            *initialize_context = Some(InitializeContext {\n                timeout,\n                client_service,\n            });\n        }\n\n        {\n            let mut guard = self.state.lock().await;\n            if matches!(*guard, ClientState::Closed) {\n                return Err(anyhow!(\"MCP client is shut down\"));\n            }\n            *guard = ClientState::Ready {\n                service,\n                oauth: oauth_persistor.clone(),","sourceCodeStart":600,"sourceCodeEnd":636,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/rmcp-client/src/rmcp_client.rs#L600-L636","documentation":"Error \"handshake succeeded but server info was missing\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/rmcp-client/src/rmcp_client.rs:618 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"339751715c64496cb86246bfb3935f40e309dd3d","analyzedAt":"2026-08-25T05:35:09.876Z","schemaVersion":2},"datasetVersion":"2026-08-25T06:17:31.827Z"}