Files
codex/codex-rs/core/tests
Ahmed Ibrahim 55b6f282a8 Keep MCP resource helpers available in code mode (#50546)
## 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
2026-10-03 06:42:48 +00:00
..