Skip to content

Avoid blocking turns on optional MCP startup - #35742

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

Avoid blocking turns on optional MCP startup#35742
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/b5f895c5a5362fe73f7d33250367662d4a217e4d

Conversation

@copyberry

@copyberry copyberry Bot commented Jul 28, 2026

Copy link
Copy Markdown

Avoid blocking turns on optional MCP startup

Why

A pending optional MCP server can delay the first model request even when the
turn does not need that server.

What changed

  • Give optional MCP servers a shared one-second startup grace, then omit servers
    that are still pending from the captured tool catalog.
  • Continue waiting when the turn explicitly requires a server through a plugin,
    skill dependency, or mcp:// mention, and preserve this behavior for input
    received between sampling steps.
  • Route direct resource requests to the live connection set when a pending
    server was omitted from the binding, while keeping all-server resource
    discovery non-blocking.

Testing

  • Cover the shared grace period and resource behavior for pending optional
    servers.
  • Verify plugin, plugin-skill, and direct MCP mentions wait for startup.
  • Verify an Apps-enabled turn proceeds without tools from an unrelated pending
    optional server.

## Why

A pending optional MCP server can delay the first model request even when the
turn does not need that server.

## What changed

- Give optional MCP servers a shared one-second startup grace, then omit servers
  that are still pending from the captured tool catalog.
- Continue waiting when the turn explicitly requires a server through a plugin,
  skill dependency, or `mcp://` mention, and preserve this behavior for input
  received between sampling steps.
- Route direct resource requests to the live connection set when a pending
  server was omitted from the binding, while keeping all-server resource
  discovery non-blocking.

## Testing

- Cover the shared grace period and resource behavior for pending optional
  servers.
- Verify plugin, plugin-skill, and direct MCP mentions wait for startup.
- Verify an Apps-enabled turn proceeds without tools from an unrelated pending
  optional server.

GitOrigin-RevId: b5f895c5a5362fe73f7d33250367662d4a217e4d
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/b5f895c5a5362fe73f7d33250367662d4a217e4d branch from d8497b3 to d9e1c9c Compare July 28, 2026 09:34
@copyberry
copyberry Bot merged commit d9e1c9c into main Jul 28, 2026
14 of 32 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/b5f895c5a5362fe73f7d33250367662d4a217e4d branch July 28, 2026 09:35
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 28, 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.

3 participants