From 71e0f64679ffed487e3cf2c0989603ff177d3065 Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Thu, 3 Sep 2026 13:30:56 -0700 Subject: [PATCH] =?UTF-8?q?simplify(compat):=20tools/mcp=5Ftool=20?= =?UTF-8?q?=E2=80=94=20repoint=20agent/turn=5Fcontext=20between-turns=20re?= =?UTF-8?q?fresh=20import=20(missed=20hunk)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- agent/turn_context.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/agent/turn_context.py b/agent/turn_context.py index 9f3143a8ae..df86b2746f 100644 --- a/agent/turn_context.py +++ b/agent/turn_context.py @@ -396,7 +396,8 @@ def _refresh_mcp_tools_between_turns(agent: Any) -> None: # Import-cost gate: MCP tools are only registered by code that already imported # ``tools.mcp_tool`` (~0.4s); not in sys.modules => nothing to do. if not getattr(agent, "_skip_mcp_refresh", False) and "tools.mcp_tool" in sys.modules: - from tools.mcp_tool import has_registered_mcp_tools, refresh_agent_mcp_tools + from tools.mcp_tool_discovery import has_registered_mcp_tools + from tools.mcp_tool_agent import refresh_agent_mcp_tools if has_registered_mcp_tools(): refresh_agent_mcp_tools(agent, quiet_mode=True, preserve_prefix=True) except Exception: