{"record":{"id":"4ea4a34987997470","repo":"openai/codex","slug":"failed-to-send-elicitation-response-e-4ea4a3","errorCode":null,"errorMessage":"failed to send elicitation response: {e:?}","messagePattern":"failed to send elicitation response: (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"codex-rs/core/src/session/mcp.rs","lineNumber":631,"sourceCode":"        &self,\n        server_name: String,\n        id: RequestId,\n        response: ElicitationResponse,\n    ) -> anyhow::Result<()> {\n        let entry = {\n            let mut active = self.active_turn.lock().await;\n            match active.as_mut() {\n                Some(at) => {\n                    let mut ts = at.turn_state.lock().await;\n                    ts.remove_pending_elicitation(&server_name, &id)\n                }\n                None => None,\n            }\n        };\n        if let Some(tx_response) = entry {\n            tx_response\n                .send(response)\n                .map_err(|e| anyhow::anyhow!(\"failed to send elicitation response: {e:?}\"))?;\n            return Ok(());\n        }\n\n        self.services\n            .mcp_runtime\n            .resolve_elicitation(server_name, id, response)\n            .await\n    }\n\n    pub(crate) async fn refresh_mcp_servers_now(\n        &self,\n        turn_context: &TurnContext,\n        refresh_config: &Config,\n        elicitation_reviewer: Option<ElicitationReviewerHandle>,\n    ) {\n        let Ok(_refresh) = self.mcp_refresh.acquire().await else {\n            error!(\"MCP runtime refresh semaphore closed\");\n            return;","sourceCodeStart":613,"sourceCodeEnd":649,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/core/src/session/mcp.rs#L613-L649","documentation":"Error \"failed to send elicitation response: {e:?}\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/core/src/session/mcp.rs:631 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry sending the elicitation response and verify the MCP connection is alive."],"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"}