MCP-server sprawl caused 194 GB commit hang; cull + tool-search fix
Symptoms
- Windows 11 26200 hang on 20 min uptime; explorer laggy, click-to-response 3-5s.
Get-CimInstance Win32_OperatingSystem: commit 194 GB used / 174 GB limit (over limit).- Sum of process PM: 193.8 GB. WS sum 72.5 GB.
- Free RAM 82.9 GB — misleading; commit was the ceiling.
Root cause
345 node.exe (peak 480) processes. Total 157 GB private commit.
Each was a stdio MCP server spawned via npx -y <server>. Two nodes per server (npx-cli parent + child). Multiple CC / OpenCode / Kilo sessions accumulated them; unclean shutdown left orphans.
Sample parents: foam-cli, mermaid-mcp-server, mcp-doctor, one-search-mcp, open-websearch, resend-mcp, crawl-mcp, ref-tools, context7. All of these lazy-load on demand under ENABLE_TOOL_SEARCH=auto, but sibling agents were spawning them all on connect.
Fix
| Step | Command | Effect |
|---|---|---|
| Kill orphan node with MCP-shaped cmdline | Get-CimInstance Win32_Process -Filter "Name = 'node.exe'" | Stop-Process (filtered by npx-cli/mcp/foam/etc. regex, kept Raycast + cavemem workers) |
480 → 5 node procs, -189 GB commit |
| Remove HKCU duplicate autostarts | Remove-ItemProperty HKCU:\Software\Microsoft\Windows\CurrentVersion\Run for Docker Desktop, electron.app.LM Studio, screenpipe - Development |
Killed dupe launches |
| Kill dev-server autostart shortcut | Removed freellmapi Dev.lnk + screenpipe-start.bat from Startup folder |
Kept OmniRoute Dev.lnk per user pick |
| Disable deprecated Hr tasks | Disable-ScheduledTask on Oriz-Headroom-Login, DockerHeadroomEnsure, HeadroomWatchdog |
Hr chain removed 2026-07-03; tasks were still armed |
Add Smithery toolbox to OpenCode mcp |
Mirrored Kilo's toolbox config into ~/.config/opencode/opencode.jsonc |
Lazy schema loading across full fleet |
Result
- Commit 194 GB → 57 GB.
- Node processes 480 → 5.
- Free RAM 82.9 → 89.4 GB.
Preventive rules
- Every fleet agent must lazy-load MCP tools. See
mcp-lazy-load-mandatory-2026-07-06. - Kill orphans on SessionStart. Extend
Oriz-SyncAgentConfigsto run the orphan-kill snippet.
Elevated follow-up (user runs manually)
Pagefile is still fixed 43 GB alloc / 174 GB commit limit for 128 GB RAM. To switch to system-managed, run once from an elevated PowerShell:
$cs = Get-CimInstance Win32_ComputerSystem; Set-CimInstance -InputObject $cs -Property @{AutomaticManagedPagefile = $true}
Requires reboot to take full effect. Not strictly needed now that commit is 37% of limit.
Cross-refs
agent-mcps-canonical-2026-07-04— the shared MCP listclaude-code-latency-techniques— cache +ENABLE_TOOL_SEARCH=autocontext- SOFA question candidate: cross-agent MCP process governance on Windows (2 CC sessions × N MCPs = N² nodes)