{"record":{"id":"1ee2c69512e0e4cf","repo":"openai/codex","slug":"recovered-handshake-succeeded-but-server-info-was","errorCode":null,"errorMessage":"recovered handshake succeeded but server info was missing","messagePattern":"recovered 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":1465,"sourceCode":"\n        let initialize_context = self\n            .initialize_context\n            .lock()\n            .await\n            .clone()\n            .ok_or_else(|| anyhow!(\"MCP client cannot recover before initialize succeeds\"))?;\n        let pending_transport = Self::create_pending_transport(&self.transport_recipe).await?;\n        let (service, oauth_persistor) = self\n            .connect_pending_transport_with_initialize_retries(\n                pending_transport,\n                initialize_context.client_service,\n                initialize_context.timeout,\n            )\n            .await?;\n        service\n            .peer()\n            .peer_info()\n            .ok_or_else(|| anyhow!(\"recovered handshake succeeded but server info was missing\"))?;\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(),\n            };\n        }\n\n        if let Some(runtime) = oauth_persistor\n            && let Err(error) = runtime.persist_if_needed().await\n        {\n            warn!(\"failed to persist OAuth tokens after session recovery: {error}\");\n        }\n","sourceCodeStart":1447,"sourceCodeEnd":1483,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/rmcp-client/src/rmcp_client.rs#L1447-L1483","documentation":"Error \"recovered handshake succeeded but server info was missing\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/rmcp-client/src/rmcp_client.rs:1465 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"}