Skip to content

The agent that grows with you

simplify(compat): tools/mcp_tool — repoint agent/turn_context between-turns refresh import (missed hunk)

Teknium71e0f64679ff
diff --git a/agent/turn_context.py b/agent/turn_context.py
index 9f3143a8aea..df86b2746fc 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: