Request to submit deferred MCP discovery fix
Hello,
I have a reviewed and tested fix for a deferred MCP discovery issue in Codex.
Root cause:
Configured MCP server names mentioned in normal language were not added to the turn’s required server set before the initial tool catalog was captured. A fresh conversation could therefore incorrectly report a configured MCP server as unavailable before deferred discovery completed.
Fix:
- Generic whole-name, case-insensitive matching for configured MCP server names
- Wait for explicitly mentioned configured servers before initial tool-catalog capture
- Handles the fresh-session
current_config()race by combining the turn’s configured server map with the resolved runtime catalog - Adds secret-free discovery lifecycle logging
- No provider-specific, ContextSync-specific, authentication, authorization, or MCP protocol changes
Validation:
codex-mcp: 165/165 passed- focused mention regressions: 2/2 passed
- delayed-discovery runtime regression: passed
- no-MCP-mention behavior: passed
- scoped Clippy: passed
- formatting and
git diff --check: passed
Prepared branch:
- Fork:
a13onat9/codex - Branch:
fix/deferred-mcp-server-mentions - Commit:
1ecc5224978492114a314b6f3dcd8a29b70ab4ab
GitHub currently blocks PR creation because only collaborators may open pull requests.
Could you please either:
- invite
a13onat9as a collaborator with permission to open the PR, or - open the PR from the prepared fork branch?
Suggested release note:
“Codex now waits for deferred discovery of enabled, configured MCP servers explicitly mentioned by name, case-insensitively and with whole-name matching, before capturing the turn’s initial tool catalog.”
Thank you.