Why OpenAI Codex Enables Tool Search by Default for Better Efficiency

Why OpenAI Codex Enables Tool Search by Default
Codex now activates tool search automatically. This happens for supported models. The shift replaces static schema injection with dynamic discovery. The system retrieves tools only when the agent identifies a specific need.
A fundamental shift has occurred. Previously, developers relied on feature flags. They accepted the performance penalty of loading every tool. The recent merge of PR #17854 promoted ToolSearch to stable status. This update ensures the searched-tool flow is standard. You no longer need complex toggles. Accessing this efficiency is now automatic.
The shift from static to dynamic
Context management is the core distinction. In the legacy approach, Codex received the full Model Context Protocol (MCP) schema. This happened at the start of every session. The method caused significant context pollution. Irrelevant tool definitions occupied valuable space. The model processed this noise unnecessarily.
Dynamic search alters this workflow. The agent begins with a clean slate. It analyzes the user request first. If external action is necessary, it triggers a semantic search. This process queries the tool registry. The system injects only relevant definitions. This targeted approach preserves model attention.
This architecture aligns with Codex design goals. The agent, written primarily in Rust, prioritizes speed. We reduce initial latency by removing upfront schema loading costs. The agent acts like a skilled developer. It consults documentation only when needed. It does not memorize every library function. This on-demand retrieval supports better token optimization. Developers connect numerous MCP servers without fear. The system scales gracefully. Your tool ecosystem grows without issue.
OpenAI removed the full tool list. This eliminates pollution and reduces token waste. Agents process only relevant definitions. This leads to significant cost savings. Response times improve noticeably.
Reducing context pollution
The Model Context Protocol (MCP) connects AI applications efficiently Source: modelcontextprotocol.io. This standardization offers clear benefits. Yet it introduces a challenge. Servers expose hundreds of tools. Injecting every definition creates substantial noise. The model parses irrelevant schemas. This distracts from the primary task. Context pollution degrades reasoning quality.
Before recent updates, MCP tools used tool search conditionally. This occurred only if a feature flag was enabled. Or if there were at least 100 tools Source: github.com. This threshold approach was insufficient. Developers faced latency spikes. The context window filled with unused signatures. OpenAI removed the full list. The agent now focuses on immediate intent. It does not scan a massive registry. The searched-tool flow is now intended behavior Source: github.com. Uniformity prevents accuracy degradation.
Improving token efficiency
Token optimization manages operational costs.
Frequently Asked Questions
Does enabling tool search by default increase latency?
How many tools does Codex retrieve per search query?
Is tool search compatible with custom MCP servers?
What happens if tool search fails to find a relevant tool?
Do I need to update my Codex configuration to use tool search?
Nicola
Developer and creator of vexp — a context engine for AI coding agents. I build tools that make AI coding assistants faster, cheaper, and actually useful on real codebases.
Keep reading
Related articles

EU AI Act August 2 Developer Tools: Compliance Checklist for 2026
Prepare your AI tools for the EU AI Act August 2 deadline. Learn Article 50 transparency obligations, high-risk classification, and developer compliance checklist.

Grok 4.5 Cursor Cost Per Task: Pricing Analysis and Developer ROI
Calculate Grok 4.5 cursor cost per task with our pricing analysis. Compare token rates, caching savings, and Cursor Pro subscription value for developers.

AI Coding Cost Per Engineer Per Month: 2026 Benchmarks and Hidden Fees
Discover the real AI coding cost per engineer per month in 2026, from $19 subscriptions to $500 fully loaded. Learn about hidden fees, token usage, and ROI.