Skip to content

Conversation

bolinfest
Copy link
Collaborator

@bolinfest bolinfest commented Sep 10, 2025

#3395 updated mcp-types/src/lib.rs by hand, but that file is generated code that is produced by mcp-types/generate_mcp_types.py. Unfortunately, we do not have anything in CI to verify this right now, but I will address that in a subsequent PR.

#3395 ended up introducing a change that added a required field when deserializing InitializeResult, breaking Codex when used as an MCP client, so the quick fix in #3436 was to make the new field Optional with skip_serializing_if = "Option::is_none", but that did not address the problem that mcp-types/generate_mcp_types.py and mcp-types/src/lib.rs are out of sync.

This PR gets things back to where they are in sync. It removes the custom mcp_types::McpClientInfo type that was added to mcp-types/src/lib.rs and forces us to use the generated mcp_types::Implementation type. Though this PR also updates generate_mcp_types.py to generate the additional user_agent: Optional<String> field on Implementation so that we can continue to specify it when Codex operates as an MCP server.

However, this also requires us to specify user_agent: None when Codex operates as an MCP client.

We may want to introduce our own InitializeResult type that is specific to when we run as a server to avoid this in the future, but my immediate goal is just to get things back in sync.

Copy link
Collaborator

@gpeal gpeal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you 🙏

@bolinfest bolinfest merged commit 44262d8 into main Sep 10, 2025
19 checks passed
@bolinfest bolinfest deleted the pr3439 branch September 10, 2025 23:14
@github-actions github-actions bot locked and limited conversation to collaborators Sep 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants