Skip to content

[codex] Make handlers own parallel tool support#22254

Merged
pakrym-oai merged 1 commit into
mainfrom
pakrym/handler-owned-parallel-support
May 12, 2026
Merged

[codex] Make handlers own parallel tool support#22254
pakrym-oai merged 1 commit into
mainfrom
pakrym/handler-owned-parallel-support

Conversation

@pakrym-oai
Copy link
Copy Markdown
Collaborator

@pakrym-oai pakrym-oai commented May 12, 2026

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 on ConfiguredToolSpec duplicated 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

  • removed ConfiguredToolSpec and store plain ToolSpec values in the registry/router builder path
  • changed ToolRouter::tool_supports_parallel() to consult only the handler registry and fall back to false
  • simplified spec collection and test helpers to operate directly on ToolSpec
  • updated router/spec tests to cover handler-owned parallel behavior and the no-handler fallback

Validation

  • cargo test -p codex-tools
  • cargo test -p codex-core mcp_parallel_support_uses_handler_data
  • cargo test -p codex-core deferred_responses_api_tool_serializes_with_defer_loading
  • cargo test -p codex-core tools_without_handlers_do_not_support_parallel
  • cargo test -p codex-core request_plugin_install_can_be_registered_without_search_tool

Docs

No documentation updates needed.

@pakrym-oai pakrym-oai force-pushed the pakrym/handler-owned-parallel-support branch from 0966a22 to a4f4dba Compare May 12, 2026 04:18
@pakrym-oai pakrym-oai marked this pull request as ready for review May 12, 2026 04:39
@pakrym-oai pakrym-oai requested a review from a team as a code owner May 12, 2026 04:39
Copy link
Copy Markdown
Collaborator

@sayan-oai sayan-oai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pakrym-oai pakrym-oai merged commit c9e46ed into main May 12, 2026
38 of 39 checks passed
@pakrym-oai pakrym-oai deleted the pakrym/handler-owned-parallel-support branch May 12, 2026 05:26
@github-actions github-actions Bot locked and limited conversation to collaborators May 12, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

2 participants