Skip to content

Share MCP tool specs until search results are selected - #45509

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/4260f2e2527834d8a856b1528654c6951aab8a7d
Sep 14, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/4260f2e2527834d8a856b1528654c6951aab8a7d

Conversation

@copyberry

@copyberry copyberry Bot commented Sep 14, 2026 •

Copy link
Copy Markdown

Share MCP tool specs until search results are selected

Why

Building MCP search entries eagerly cloned tool specs and normalized schemas even for tools that were never selected.

What changed

Store search specs in Arc and let MCP search entries share the handler's spec. Materialize and normalize loadable specs only for selected results, preserving existing result formatting and dynamic-tool cache equality behavior.

Testing

Add coverage for function, freeform, and namespace specs that verifies shared specs produce equivalent results, retain the source while needed, and release it when the search entry is dropped.

## Why

Building MCP search entries eagerly cloned tool specs and normalized schemas even for tools that were never selected.

## What changed

Store search specs in `Arc` and let MCP search entries share the handler's spec. Materialize and normalize loadable specs only for selected results, preserving existing result formatting and dynamic-tool cache equality behavior.

## Testing

Add coverage for function, freeform, and namespace specs that verifies shared specs produce equivalent results, retain the source while needed, and release it when the search entry is dropped.

GitOrigin-RevId: 4260f2e2527834d8a856b1528654c6951aab8a7d
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/4260f2e2527834d8a856b1528654c6951aab8a7d branch from 758bbad to ea3c484 Compare September 14, 2026 20:20
@copyberry
copyberry Bot merged commit ea3c484 into main Sep 14, 2026
1 check passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/4260f2e2527834d8a856b1528654c6951aab8a7d branch September 14, 2026 20:20
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 14, 2026
@vergilovv
vergilovv deployed to issue-triage September 14, 2026 20:51 — with GitHub Actions Active
@vergilovv
vergilovv deployed to issue-triage September 14, 2026 20:51 — with GitHub Actions Active
@vergilovv
vergilovv deployed to issue-triage September 14, 2026 20:51 — with GitHub Actions Active
@vergilovv
vergilovv deployed to issue-triage September 14, 2026 20:52 — with GitHub Actions Active

This branch was successfully deployed

1 active deployment
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.

4 participants