{"record":{"id":"e2e85609e8eced12","repo":"openai/codex","slug":"unsupported-codex-mcp-protocol-version-for-st","errorCode":null,"errorMessage":"unsupported CODEX_MCP_PROTOCOL_VERSION `{}` for stdio MCP server; expected `2026-07-28`","messagePattern":"unsupported CODEX_MCP_PROTOCOL_VERSION `(.+?)` for stdio MCP server; expected `2026-07-28`","errorType":"validation","errorClass":"std::io::Error","httpStatus":null,"severity":"error","filePath":"codex-rs/rmcp-client/src/protocol_mode.rs","lineNumber":43,"sourceCode":"\n    pub(crate) fn client_lifecycle(self) -> ClientLifecycleMode {\n        match self {\n            Self::Legacy => ClientLifecycleMode::Initialize,\n            Self::V20260728 => ClientLifecycleMode::Auto {\n                preferred_versions: vec![ProtocolVersion::V_2026_07_28],\n                legacy_version: Some(ProtocolVersion::V_2025_06_18),\n            },\n        }\n    }\n\n    pub(crate) fn stdio_mode(self, requested_version: Option<&OsStr>) -> io::Result<Self> {\n        match (self, requested_version) {\n            (Self::Legacy, _) => Ok(Self::Legacy),\n            (_, None) => Ok(Self::Legacy),\n            (Self::V20260728, Some(version)) if version == OsStr::new(\"2026-07-28\") => {\n                Ok(Self::V20260728)\n            }\n            (_, Some(version)) => Err(io::Error::new(\n                io::ErrorKind::InvalidInput,\n                format!(\n                    \"unsupported CODEX_MCP_PROTOCOL_VERSION `{}` for stdio MCP server; expected `2026-07-28`\",\n                    version.to_string_lossy()\n                ),\n            )),\n        }\n    }\n}\n\n#[cfg(test)]\nmod tests {\n    use super::*;\n\n    #[test]\n    fn protocol_modes_select_compatible_sdk_lifecycles() {\n        assert_eq!(\n            McpProtocolMode::Legacy.preferred_protocol_version(),","sourceCodeStart":25,"sourceCodeEnd":61,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/rmcp-client/src/protocol_mode.rs#L25-L61","documentation":"Error \"unsupported CODEX_MCP_PROTOCOL_VERSION `{}` for stdio MCP server; expected `2026-07-28`\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/rmcp-client/src/protocol_mode.rs:43 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"}