Skip to content

doctor --fix leaves multiple MCP processes running after stop on Windows #60

Description

@keitharoby-byte

Summary

On Windows, multiple agent-launched Memtrace MCP processes remained alive after running npx memtrace stop followed by npx memtrace doctor --fix.

doctor --fix detected 29 running memtrace.exe processes and warned that multiple owners or stray MCP children could contend for port 3030 and .memdb, but it did not stop those processes. The resulting overhead caused severe system and Electron UI lag; manual shutdown was required to recover.

Environment

  • Windows
  • Memtrace v0.8.62
  • Update available at the time: v0.8.63
  • Multiple editor/agent MCP integrations configured

Steps to reproduce

  1. Use several concurrent agent sessions that invoke Memtrace MCP tools.
  2. Run:
    npx memtrace stop
  3. Run:
    npx memtrace doctor --fix
  4. Inspect the process list and doctor output.

Actual behavior

  • memtrace stop stopped the workspace runtime/sidecars but reported that MCP servers spawned by editor or agent clients were outside its scope.
  • memtrace doctor --fix reported 29 running memtrace.exe processes.
  • Doctor warned that multiple owners or stray MCP children could fight over port 3030 and .memdb.
  • Doctor also reported a stale PID/failed HTTP health check and an OS supervisor artifact that could not be stopped because the service was not installed.
  • The surviving processes caused enough overhead and input lag to make an Electron-based agent harness effectively unusable.

Expected behavior

There should be a supported, safe shutdown/update workflow that can terminate orphaned or stray Memtrace MCP processes, or an explicit command for stopping all Memtrace-owned processes across editor/agent sessions.

At minimum, doctor --fix should either clean up processes it identifies as stale/orphaned or clearly report which active external supervisors must be closed and provide the exact remediation command.

Sanitized diagnostic excerpt

memtrace doctor (v0.8.62)

Processes
  29 memtrace.exe processes detected

Findings
  Multiple owners or stray MCP children can fight over port 3030 and .memdb.
  Heartbeat alive but HTTP health check failed.

Fixes applied
  Stopped 0 of 1 OS supervisor artifact(s).
  Supervisor stop failed because the service was not installed.

The original diagnostic output contained local usernames, workspace names, and machine-specific paths, so it has intentionally not been attached.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions