MCP tool schemas not propagated properly
What version of Codex CLI is running?
0.111.0
What subscription do you have?
ChatGPT Team
Which model were you using?
gpt-5.4 (but this problem is not model-specific)
What platform is your computer?
Darwin 25.3.0 arm64 arm
What terminal emulator and version are you using (if applicable)?
VS Code and Ghostty
What issue are you seeing?
Codex cannot handle MCP tool input schemas containing anyOf (or similar). anyOf fields get sanitised to string before being presented to the LLM.
What steps can reproduce the bug?
I've slop coded a minimal MCP server (attached Python script). Claude Code handles this just fine, and calls the tool correctly on its first attempt. Codex sometimes eventually gets there (by reading the MCP server's implementation).
<img width="2330" height="2324" alt="Image" src="https://github.com/user-attachments/assets/60aec3cd-fbf2-42b0-9202-b1627bdb842c" />
What is the expected behavior?
Propagate tool input schemas to the LLM without modification.
Additional information
This is barely related, but I've noticed that output schemas aren't presented to the LLM at all. That's probably a separate bug (or maybe even intentional, but a bad decision IMO). I just thought I'd mention that.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗