mirror of
https://github.com/openai/codex.git
synced 2026-10-19 17:28:46 +00:00
## Why In `CodeModeOnly`, MCP resource helper definitions changed when the first server was added or the last server was removed. ## What changed Always register `list_mcp_resources`, `list_mcp_resource_templates`, and `read_mcp_resource` in `CodeModeOnly`, even without configured MCP servers. This keeps their definitions stable across server configuration changes. ## Testing Add a regression scenario that calls all three helpers before adding a server, with a server registered, and after removing it. Assert identical tool definitions across requests, empty resource and template lists, and the expected error when reading from an unknown server. GitOrigin-RevId: c5777efac250b83dd4bb1c9100a6b6169470556f