Avoid blocking turns on optional MCP startup - #35742
Merged
copyberry[bot] merged 1 commit intoJul 28, 2026
Merged
Conversation
## 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
Bot
force-pushed
the
copyberry/codex-internal-to-codex-oss/b5f895c5a5362fe73f7d33250367662d4a217e4d
branch
from
July 28, 2026 09:34
d8497b3 to
d9e1c9c
Compare
copyberry
Bot
deleted the
copyberry/codex-internal-to-codex-oss/b5f895c5a5362fe73f7d33250367662d4a217e4d
branch
July 28, 2026 09:35
LItterBoy-GB
temporarily deployed
to
issue-triage
July 28, 2026 09:43 — with
GitHub Actions
Inactive
LItterBoy-GB
temporarily deployed
to
issue-triage
July 28, 2026 09:43 — with
GitHub Actions
Inactive
LItterBoy-GB
temporarily deployed
to
issue-triage
July 28, 2026 09:43 — with
GitHub Actions
Inactive
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
that are still pending from the captured tool catalog.
skill dependency, or
mcp://mention, and preserve this behavior for inputreceived between sampling steps.
server was omitted from the binding, while keeping all-server resource
discovery non-blocking.
Testing
servers.
optional server.