Skip to content

Avoid duplicating deferred sources in tool search - #35065

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/f7dc0c4f3351a7c7daadec936b26a080202730bc
Jul 24, 2026
Merged

Avoid duplicating deferred sources in tool search#35065
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/f7dc0c4f3351a7c7daadec936b26a080202730bc

Conversation

@copyberry

@copyberry copyberry Bot commented Jul 24, 2026

Copy link
Copy Markdown

Avoid duplicating deferred sources in tool search

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.

## 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
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/f7dc0c4f3351a7c7daadec936b26a080202730bc branch from 95627c7 to 3947f0d Compare July 24, 2026 01:25
@copyberry
copyberry Bot merged commit 3947f0d into main Jul 24, 2026
32 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/f7dc0c4f3351a7c7daadec936b26a080202730bc branch July 24, 2026 01:26
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant