🐫 CAMEL: The first and the best multi-agent framework. Finding the Scaling Law of Agents. https://www.camel-ai.org
Python agentai-societiesartificial-intelligencecommunicative-aicooperative-aideep-learninglarge-language-modelsmulti-agent-systemsnatural-language-processing
fix : ACI Windows MCPToolkit fix (#2870)
Parth Sharmaca007d80ea3b
diff --git a/camel/utils/mcp_client.py b/camel/utils/mcp_client.pyindex 7df3d861c..0a7f009c9 100644--- a/camel/utils/mcp_client.py+++ b/camel/utils/mcp_client.py@@ -353,6 +353,14 @@ class MCPClient:finally:self._connection_context = None+ # Add a small delay to allow subprocess cleanup on Windows+ # This prevents "Event loop is closed" errors during shutdown+ import asyncio+ import sys++ if sys.platform == "win32":+ await asyncio.sleep(0.01)+finally:# Ensure state is resetself._tools = []