From 1bcfe9c58ac7d9b7aecb876dc583416fe31dc4c6 Mon Sep 17 00:00:00 2001 From: YapBi <129007007+HeLLGURD@users.noreply.github.com> Date: Fri, 5 Jun 2026 04:22:48 +0300 Subject: [PATCH] fix(cli): widen _run_cleanup MCP shutdown guard to BaseException --- cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli.py b/cli.py index d429e14fc..0e97c480d 100644 --- a/cli.py +++ b/cli.py @@ -974,7 +974,7 @@ def _run_cleanup(): try: from tools.mcp_tool import shutdown_mcp_servers shutdown_mcp_servers() - except Exception: + except BaseException: pass # Close cached auxiliary LLM clients (sync + async) so that # AsyncHttpxClientWrapper.__del__ doesn't fire on a closed event loop