Skip to content

Expose cached MCP tools before server startup - #35590

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/3aae8f474c344ccdc5e08fe321bbad21d85bffd1
Jul 27, 2026
Merged

Expose cached MCP tools before server startup#35590
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/3aae8f474c344ccdc5e08fe321bbad21d85bffd1

Conversation

@copyberry

@copyberry copyberry Bot commented Jul 27, 2026

Copy link
Copy Markdown

Expose cached MCP tools before server startup

Why

Cached MCP definitions can be supplied to inference without waiting for the
server to finish initializing.

What changed

  • Publish cached tools while startup is still in progress, clearing their
    potentially stale read-only hint.
  • Wait for the selected server to start before executing a tool call, then
    prepare the call against the refreshed live binding.
  • Keep cached tools visible in a binding even when no live client is available,
    while rejecting attempts to prepare those calls.

Testing

  • Cover cached-tool visibility before startup and replacement with live tool
    metadata afterward.
  • Verify cached definitions reach inference before MCP initialization and that
    calls unavailable in the live catalog return the expected model-visible
    error.

## Why

Cached MCP definitions can be supplied to inference without waiting for the
server to finish initializing.

## What changed

- Publish cached tools while startup is still in progress, clearing their
  potentially stale read-only hint.
- Wait for the selected server to start before executing a tool call, then
  prepare the call against the refreshed live binding.
- Keep cached tools visible in a binding even when no live client is available,
  while rejecting attempts to prepare those calls.

## Testing

- Cover cached-tool visibility before startup and replacement with live tool
  metadata afterward.
- Verify cached definitions reach inference before MCP initialization and that
  calls unavailable in the live catalog return the expected model-visible
  error.

GitOrigin-RevId: 3aae8f474c344ccdc5e08fe321bbad21d85bffd1
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/3aae8f474c344ccdc5e08fe321bbad21d85bffd1 branch from ebece86 to 3bbf1fe Compare July 27, 2026 10:26
@copyberry
copyberry Bot merged commit 3bbf1fe into main Jul 27, 2026
14 of 32 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/3aae8f474c344ccdc5e08fe321bbad21d85bffd1 branch July 27, 2026 10:27
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 27, 2026
@tttol
tttol temporarily deployed to issue-triage July 27, 2026 10:39 — with GitHub Actions Inactive
@tttol
tttol temporarily deployed to issue-triage July 27, 2026 10:39 — with GitHub Actions Inactive
@tttol
tttol temporarily deployed to issue-triage July 27, 2026 10:39 — with GitHub Actions Inactive
@tttol
tttol temporarily deployed to issue-triage July 27, 2026 10:40 — with GitHub Actions Inactive
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.

3 participants