[codex] Make handlers own parallel tool support#22254
Merged
Merged
Conversation
0966a22 to
a4f4dba
Compare
sayan-oai
approved these changes
May 12, 2026
Collaborator
sayan-oai
left a comment
There was a problem hiding this comment.
change makes readme stale http://github.com/openai/codex/blob/main/codex-rs/tools/README.md?plain=1#L13
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Why
ToolRouter::tool_supports_parallel()was still consulting configured specs when a handler lookup missed, even though parallel schedulability is really a property of the executable handler. Keeping that metadata onConfiguredToolSpecduplicated state between the model-visible spec layer and the runtime handler layer.This change makes handlers the sole source of truth for parallel tool support and removes the extra spec wrapper that only existed to carry duplicated metadata.
What changed
ConfiguredToolSpecand store plainToolSpecvalues in the registry/router builder pathToolRouter::tool_supports_parallel()to consult only the handler registry and fall back tofalseToolSpecValidation
cargo test -p codex-toolscargo test -p codex-core mcp_parallel_support_uses_handler_datacargo test -p codex-core deferred_responses_api_tool_serializes_with_defer_loadingcargo test -p codex-core tools_without_handlers_do_not_support_parallelcargo test -p codex-core request_plugin_install_can_be_registered_without_search_toolDocs
No documentation updates needed.