Version
codebase-memory-mcp 0.8.1
Platform
Windows (x64)
Install channel
GitHub release archive / install.sh / install.ps1
Binary variant
ui
What happened, and what did you expect?
On Windows, the Control Panel → "Active Processes" section is always empty, even when multiple codebase-memory-mcp.exe processes are running. On macOS/Linux the same section correctly lists all running codebase-memory-mcp processes (with PID, CPU%, RSS, elapsed time, command).
Expected: Windows should enumerate all running codebase-memory-mcp.exe processes, just like macOS/Linux does.
Actual: The "Active Processes" panel is always blank and renders the control.noProcesses placeholder ("No processes found" / "未找到进程"), making process monitoring and the "Kill" action unusable on Windows.
Reproduction
Steps
- Install
codebase-memory-mcp v0.8.1 (UI variant) on Windows 11 via the official release archive / install.ps1.
- Start the server:
codebase-memory-mcp serve --ui=true --port=9749
- Open
http://localhost:9749 in a browser and switch to the Control Panel tab.
- Observe that the "Active Processes" section is empty (renders
control.noProcesses).
- Sanity-check the API directly:
curl http://localhost:9749/api/processes
Windows output (bug):
{"self_pid":12345,"self_rss_mb":42.0,"self_user_cpu_s":0.1,"self_sys_cpu_s":0.0,"processes":[]}
macOS output (correct):
{"self_pid":67890,"self_rss_mb":38.0,"self_user_cpu_s":0.2,"self_sys_cpu_s":0.0,"processes":[{"pid":67890,"cpu":0.2,"rss_mb":38.0,"elapsed":"00:42","command":"codebase-memory-mcp","is_self":true}]}
Root cause (source-level)
src/ui/http_server.c → handle_processes() (around line 251).
The #ifdef _WIN32 branch (lines 255–275) only fills self-metrics, then hardcodes "processes":[]}:
pos += snprintf(buf + pos, sizeof(buf) - (size_t)pos,
"{\"self_pid\":%d,\"self_rss_mb\":%.1f,"
"\"self_user_cpu_s\":%.1f,\"self_sys_cpu_s\":%.1f,\"processes\":[]}",
(int)_getpid(), (double)rss_bytes / (1024.0 * 1024.0), user_s, sys_s);
The #else branch (macOS/Linux, lines 276–336) correctly enumerates processes via:
FILE *fp = popen("LC_ALL=C ps -eo pid,pcpu,rss,etime,comm 2>/dev/null"
" | grep '[c]odebase-memory-mcp'", "r");
No equivalent enumeration is implemented in the Windows branch — it is simply missing.
Suggested fix
Replace the hardcoded "processes":[]} in the Windows branch with a CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0) enumeration, matching image filenames containing codebase-memory-mcp via GetProcessImageFileNameA (already available via <psapi.h>), then reading GetProcessMemoryInfo + GetProcessTimes per PID. Emit the same JSON shape as the macOS branch (pid/cpu/rss_mb/elapsed/command/is_self).
Related (separate bug, mentioning for visibility)
handle_process_kill in the same file wraps its child-PID whitelist check in #ifndef _WIN32, so on Windows any PID (including unrelated user processes) can be terminated via /api/process-kill. Worth filing as a separate security/correctness issue.
Environment
codebase-memory-mcp 0.8.1 (UI variant)
- Windows 11 x64
- Install channel: GitHub release archive /
install.ps1
- Confirmed not a duplicate against existing open issues.
Logs
$ curl http://localhost:9749/api/processes
{"self_pid":12345,"self_rss_mb":42.0,"self_user_cpu_s":0.1,"self_sys_cpu_s":0.0,"processes":[]}
$ tasklist /FI "IMAGENAME eq codebase-memory-mcp.exe"
Image Name PID Session Name Session# Mem Usage
========================= ======== ================ =========== ============
codebase-memory-mcp.exe 12345 Console 1 42,108 K
codebase-memory-mcp.exe 12501 Console 1 18,420 K
(Server reports zero processes despite two running instances being clearly visible to the OS.)
Diagnostics trajectory (memory / performance / leak issues)
Project scale (if relevant)
No response
Confirmations
Version
codebase-memory-mcp 0.8.1
Platform
Windows (x64)
Install channel
GitHub release archive / install.sh / install.ps1
Binary variant
ui
What happened, and what did you expect?
On Windows, the Control Panel → "Active Processes" section is always empty, even when multiple
codebase-memory-mcp.exeprocesses are running. On macOS/Linux the same section correctly lists all runningcodebase-memory-mcpprocesses (with PID, CPU%, RSS, elapsed time, command).Expected: Windows should enumerate all running
codebase-memory-mcp.exeprocesses, just like macOS/Linux does.Actual: The "Active Processes" panel is always blank and renders the
control.noProcessesplaceholder ("No processes found" / "未找到进程"), making process monitoring and the "Kill" action unusable on Windows.Reproduction
Steps
codebase-memory-mcpv0.8.1 (UI variant) on Windows 11 via the official release archive /install.ps1.http://localhost:9749in a browser and switch to the Control Panel tab.control.noProcesses).{"self_pid":12345,"self_rss_mb":42.0,"self_user_cpu_s":0.1,"self_sys_cpu_s":0.0,"processes":[]}{"self_pid":67890,"self_rss_mb":38.0,"self_user_cpu_s":0.2,"self_sys_cpu_s":0.0,"processes":[{"pid":67890,"cpu":0.2,"rss_mb":38.0,"elapsed":"00:42","command":"codebase-memory-mcp","is_self":true}]}Root cause (source-level)
src/ui/http_server.c→handle_processes()(around line 251).The
#ifdef _WIN32branch (lines 255–275) only fills self-metrics, then hardcodes"processes":[]}:The
#elsebranch (macOS/Linux, lines 276–336) correctly enumerates processes via:No equivalent enumeration is implemented in the Windows branch — it is simply missing.
Suggested fix
Replace the hardcoded
"processes":[]}in the Windows branch with aCreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0)enumeration, matching image filenames containingcodebase-memory-mcpviaGetProcessImageFileNameA(already available via<psapi.h>), then readingGetProcessMemoryInfo+GetProcessTimesper PID. Emit the same JSON shape as the macOS branch (pid/cpu/rss_mb/elapsed/command/is_self).Related (separate bug, mentioning for visibility)
handle_process_killin the same file wraps its child-PID whitelist check in#ifndef _WIN32, so on Windows any PID (including unrelated user processes) can be terminated via/api/process-kill. Worth filing as a separate security/correctness issue.Environment
codebase-memory-mcp0.8.1 (UI variant)install.ps1Logs
Diagnostics trajectory (memory / performance / leak issues)
Project scale (if relevant)
No response
Confirmations