From 19bef7659f3974d8b5bc116f1096a86696acce3c Mon Sep 17 00:00:00 2001 From: aibrahim-oai Date: Mon, 28 Jul 2025 10:26:27 -0700 Subject: [PATCH] Serializing the `eventmsg` type to snake_case (#1709) This was an abrupt change on our clients. We need to serialize as snake_case. --- codex-rs/core/src/protocol.rs | 2 +- codex-rs/mcp-server/tests/common/mcp_process.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/codex-rs/core/src/protocol.rs b/codex-rs/core/src/protocol.rs index 1a6313db..22bc1809 100644 --- a/codex-rs/core/src/protocol.rs +++ b/codex-rs/core/src/protocol.rs @@ -280,7 +280,7 @@ pub struct Event { /// Response event from the agent #[derive(Debug, Clone, Deserialize, Serialize, Display)] #[serde(tag = "type", rename_all = "snake_case")] -#[strum(serialize_all = "lowercase")] +#[strum(serialize_all = "snake_case")] pub enum EventMsg { /// Error while executing a submission Error(ErrorEvent), diff --git a/codex-rs/mcp-server/tests/common/mcp_process.rs b/codex-rs/mcp-server/tests/common/mcp_process.rs index 528a4015..8138749c 100644 --- a/codex-rs/mcp-server/tests/common/mcp_process.rs +++ b/codex-rs/mcp-server/tests/common/mcp_process.rs @@ -294,7 +294,7 @@ impl McpProcess { } } // New schema: method is the Display of EventMsg::SessionConfigured => "SessionConfigured" - if notification.method == "sessionconfigured" { + if notification.method == "session_configured" { if let Some(msg) = params.get("msg") { if let Some(session_id) = msg.get("session_id").and_then(|v| v.as_str())