Environment
- Reasonix: 1.4.0-canary.3
- codegraph: v0.9.7 (bundled)
- OS: Windows 11
Summary
After a Reasonix session, 35 orphaned codegraph serve --mcp processes survived, consuming ~1,753 MB. One additional instance with --path C:\ ate 1,048 MB indexing the entire system drive. Total: ~2.8 GB leaked before manual kill.
Details
1. Mass orphaned processes (35 instances, ~1,753 MB)
All spawned within 1 second (08:51:35–36), each by a unique cmd.exe parent:
cmd.exe /c ...\codegraph.cmd serve --mcp
Every cmd.exe parent is already dead — the node.exe children were never reaped:
- 33 instances: no
--path, ~48–50 MB each
- 1 instance:
--path C:\PersonalData\Development\Projects\VectorCraft, 78 MB
- 1 instance:
--path C:\Users\...\reasonix\global-workspace, 57 MB
Every process is byte-identical — these are failed MCP connection retries that accumulated.
2. C:\ root indexer (1,048 MB, manually killed)
PID 26244
Parent PID 4292 (another codegraph serve --mcp, also dead)
WorkingSet: 1,073,368 K
CommandLine: codegraph serve --mcp --path C:\
Created: 2026-06-10 08:55:41
This process was indexing the entire C drive — C:\Windows, C:\Program Files, everything. Unbounded memory growth until killed.
Root Cause
Reasonix spawns codegraph via cmd.exe /c codegraph.cmd serve --mcp. When the MCP handshake fails or times out, Reasonix kills (or lets exit) the cmd.exe wrapper — but node.exe survives as an orphan:
- No process group kill — killing
cmd.exe doesn't propagate to node.exe
- No self-termination — codegraph has no watchdog; when the MCP stdio pipe closes it doesn't exit
- No dedup — each retry spawns a brand new pair, old ones linger
The --path C:\ case is a separate concern — Reasonix somehow resolved the workspace to C:\ and passed that to codegraph, triggering unbounded filesystem indexing.
Expected Fix (Reasonix side)
- Kill the process group (or at least the child
node.exe), not just the cmd.exe shell
- Deduplicate — don't spawn a new MCP server if one is already running for the same path
- Enforce a maximum lifespan / idle timeout on MCP server processes
- Guard the
--path argument — never pass a filesystem root to codegraph
Screenshot

Environment
Summary
After a Reasonix session, 35 orphaned
codegraph serve --mcpprocesses survived, consuming ~1,753 MB. One additional instance with--path C:\ate 1,048 MB indexing the entire system drive. Total: ~2.8 GB leaked before manual kill.Details
1. Mass orphaned processes (35 instances, ~1,753 MB)
All spawned within 1 second (08:51:35–36), each by a unique
cmd.exeparent:Every
cmd.exeparent is already dead — thenode.exechildren were never reaped:--path, ~48–50 MB each--path C:\PersonalData\Development\Projects\VectorCraft, 78 MB--path C:\Users\...\reasonix\global-workspace, 57 MBEvery process is byte-identical — these are failed MCP connection retries that accumulated.
2. C:\ root indexer (1,048 MB, manually killed)
This process was indexing the entire C drive —
C:\Windows,C:\Program Files, everything. Unbounded memory growth until killed.Root Cause
Reasonix spawns codegraph via
cmd.exe /c codegraph.cmd serve --mcp. When the MCP handshake fails or times out, Reasonix kills (or lets exit) thecmd.exewrapper — butnode.exesurvives as an orphan:cmd.exedoesn't propagate tonode.exeThe
--path C:\case is a separate concern — Reasonix somehow resolved the workspace toC:\and passed that to codegraph, triggering unbounded filesystem indexing.Expected Fix (Reasonix side)
node.exe), not just thecmd.exeshell--pathargument — never pass a filesystem root to codegraphScreenshot