{{ message }}
fix: remove_all_tools missing hosted tool types#2885
Merged
seratch merged 1 commit intoopenai:mainfrom Apr 15, 2026
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 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.

Summary
remove_all_toolsalready strips function calls, computer calls, web/file/tool search calls, MCP items, and reasoning items, but it still leaves hosted tool calls andToolApprovalItemin the handoff input. After a handoff that uses this filter, the next agent receivescode_interpreter_call,image_generation_call,local_shell_call(_output),shell_call(_output), andapply_patch_call(_output)items in its raw input history, plus any unresolvedToolApprovalItementries inpre_handoff_itemsandnew_items.This is the same gap #2700 closed for MCP and reasoning items, applied to the remaining hosted tool types.
Changes:
ToolApprovalItemto_remove_tools_from_items._remove_tool_types_from_input.Test plan
test_removes_hosted_tool_types_from_input_historycovering all eight new types in raw input history.test_removes_tool_approval_from_new_itemscoveringToolApprovalItemremoval frompre_handoff_itemsandnew_items.uv run pytest tests/test_extension_filters.py— 36 passed.make lint,make format,make typecheckon the touched files — all clean.Checks
make lintandmake format