Repository navigation
Keep tool_search visible in code-mode-only sessions - #1
Open
yunusemregul wants to merge 1 commit into
Open
yunusemregul wants to merge 1 commit into
yunusemregul wants to merge 1 commit into
Conversation
This was referenced Jul 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Keep
tool_searchon the direct model tool surface whencode_mode_onlyis enabled, while leaving deferred MCP tools out of the initial prompt until they are discovered.This adds planner coverage and a Responses Lite integration test that searches for a deferred MCP tool and then calls the returned namespace tool.
Why
In code-mode-only sessions, ordinary tools are removed from the top-level model surface unless they are explicitly direct-model-only. MCP tools may also be deferred to
tool_search. Because the cachedtool_searchhandler retained normal exposure, the code-mode-only filter removed the search bridge at the same time as the MCP tools were deferred. The server could initialize and completetools/list, but the model had no callable path to reach the discovered tools.Addresses openai#19425. Related reports: openai#14242 and openai#10499.
How
tool_searchhandler exposure toDirectModelOnly.tool_search, receives the deferred MCP namespace from search, and successfully dispatches the namespace tool call.Testing
just fmtjust fix -p codex-coreA broad
just test -p codex-corerun was also attempted: 2,898 tests passed; most remaining failures required separately built test binaries (codex/test_stdio_server), with one unrelated timeout and one unrelated skill-budget failure.Upstream submission status
This PR is hosted in the fork as a reviewable artifact. The upstream repository documents external code contributions as invitation-only, and both GitHub GraphQL and REST rejected creating a pull request against
openai/codex. If a maintainer invites the contribution, this branch can be submitted directly upstream without modification.