Skip to content

The agent that grows with you

refactor(mcp): judge stale overlays from the same config the digest was resolved from

kshitijk4poore2e504d12b15
diff --git a/tools/mcp_tool_registration.py b/tools/mcp_tool_registration.py
index 6d3a081ae00..f7af32cf691 100644
--- a/tools/mcp_tool_registration.py
+++ b/tools/mcp_tool_registration.py
@@ -517,10 +517,10 @@ def _register_connected_into_current_scope(servers: dict) -> int:
if scope not in scopes:
continue
name = _key_name(key)
- if name not in servers and name not in omitted:
+ if name not in judged:
continue # attached after the config read; the next pass judges it
server = _core._servers.get(key)
- config = servers[name] if name in servers else profile_servers.get(name)
+ config = judged[name]
cross_profile = _key_scope(key) != scope
if (config is None or not mcp_server_enabled(config) or server is None
or getattr(server, "session", None) is None