Avoid duplicating deferred sources in tool search - #35065
Merged
copyberry[bot] merged 1 commit intoJul 24, 2026
Merged
Conversation
## Why Deferred tool world state already advertises the available tool sources, so repeating them in the `tool_search` description adds redundant context. ## What changed - Omit the source listing from `tool_search` when `DeferredToolWorldState` is enabled while preserving the tool discovery instructions. - Include the source-listing mode in the tool search handler cache key so the description is rebuilt when the feature state changes. ## Testing Added coverage for source omission, cache invalidation when the feature is toggled, and the resulting request payload. GitOrigin-RevId: f7dc0c4f3351a7c7daadec936b26a080202730bc
copyberry
Bot
force-pushed
the
copyberry/codex-internal-to-codex-oss/f7dc0c4f3351a7c7daadec936b26a080202730bc
branch
from
July 24, 2026 01:25
95627c7 to
3947f0d
Compare
copyberry
Bot
deleted the
copyberry/codex-internal-to-codex-oss/f7dc0c4f3351a7c7daadec936b26a080202730bc
branch
July 24, 2026 01:26
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.
Avoid duplicating deferred sources in tool search
Why
Deferred tool world state already advertises the available tool sources, so
repeating them in the
tool_searchdescription adds redundant context.What changed
tool_searchwhenDeferredToolWorldStateis enabled while preserving the tool discoveryinstructions.
description is rebuilt when the feature state changes.
Testing
Added coverage for source omission, cache invalidation when the feature is
toggled, and the resulting request payload.