Skip to content

tools: simplify default tool search text - #27526

Merged
sayan-oai merged 1 commit into
mainfrom
codex/clean-default-tool-search-text
Jun 11, 2026
Merged

tools: simplify default tool search text#27526
sayan-oai merged 1 commit into
mainfrom
codex/clean-default-tool-search-text

Conversation

@sayan-oai

@sayan-oai sayan-oai commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Why

Default tool search text currently derives identity from both ToolName and ToolSpec. For function and namespace specs, this indexes the same names more than once and also adds a flattened {namespace}{name} token that is not model-visible.

What changed

  • Derive default search text entirely from ToolSpec while preserving names, descriptions, namespace metadata, and recursive schema metadata.
  • Keep the default search-text builder private and remove the unused ToolName argument.
  • Add coverage for the exact search text generated for a namespaced tool with nested schema metadata.

Example

For the codex_app namespace and automation_update tool (schema terms omitted):

  • Before: codex_appautomation_update automation update codex_app codex_app Manage Codex automations. automation_update automation update ...
  • After: codex_app Manage Codex automations. automation_update automation update ...

Testing

  • just test -p codex-tools

@sayan-oai
sayan-oai enabled auto-merge (squash) June 11, 2026 03:26
@sayan-oai
sayan-oai merged commit 728b824 into main Jun 11, 2026
31 checks passed
@sayan-oai
sayan-oai deleted the codex/clean-default-tool-search-text branch June 11, 2026 03:37
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 11, 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.

2 participants