mirror of
https://github.com/openai/codex.git
synced 2026-10-22 17:58:46 +00:00
## Why External MCP, extension, and dynamic tools can collide with host-owned tool names. In particular, a dynamic `tool_search` definition must not replace the host implementation used to discover and route deferred tools. ## What changed - Build each turn's tools through a single ordered `ToolRegistry` that retains the first runtime registered for a name. - Treat duplicate external tools as skippable collisions while preserving strict duplicate checks for trusted host tools. - Reserve host-owned code-mode and `tool_search` runtimes before producing the model-visible tool list. - Base hosted web-search fallback behavior on the extension runtime that actually won registration. ## Testing - Cover ordered registry mutation and duplicate handling. - Verify a client-provided `tool_search` cannot shadow the host tool. - Verify hosted web-search fallback follows the registered browser runtime. GitOrigin-RevId: acebe360de8ec69ad7da2f684cc2542cbf18a984