feat: drop MCP managing tools if no MCP servers (#11900)

Drop MCP tools if no MCP servers to save context

For this https://github.com/openai/codex/issues/11049
This commit is contained in:
jif-oai authored and GitHub committed 2026-02-16 18:40:45 +00:00
1 parent cef7fbc494
commit af434b4f71
5 files changed
+67 -63

No files matched your search

@@ -353,6 +353,10 @@ pub(crate) struct McpConnectionManager {
}
impl McpConnectionManager {
pub(crate) fn has_servers(&self) -> bool {
!self.clients.is_empty()
}
pub async fn initialize(
&mut self,
mcp_servers: &HashMap<String, McpServerConfig>,