tools: remove is_mutating dispatch gating#22382
Merged
Merged
Conversation
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
Tool dispatch had two serialization mechanisms:
supports_parallel_tool_callsdecides whether a tool participates in the shared parallel-execution lock.is_mutatingseparately gated some calls inside dispatch.That second hook no longer carried its weight. The remaining parallel-support flag is already the per-tool concurrency policy, so keeping a second mutating gate made dispatch harder to follow and left behind extra session plumbing that only existed for that path.
What changed
is_mutatingfrom tool handlers and deleted thetool_call_gatepath that existed only to support it.supports_parallel_tool_callsboolean.codex-utils-readinessdependency fromcodex-coreas a follow-up fix forcargo shear.Testing
cargo test -p codex-core parallel_support_does_not_match_namespaced_local_tool_namescargo test -p codex-core mcp_parallel_support_uses_handler_datacargo test -p codex-core tools_without_handlers_do_not_support_parallel