codebase-memory-mcp install/update fails with 'active CBM sessions could not be stopped safely' after killed processes
After hard-killing codebase-memory-mcp 0.10.8 MCP server processes on macOS (Apple Silicon, install.sh), install and update permanently fail with 'active CBM sessions and operations could not be stopped safely', even though ps, daemon status and lock-file checks are all clean. What is actually blocking it, and how can it be fixed?
Originally asked on GitHub: https://github.com/DeusData/codebase-memory-mcp/issues/1760
5 answers
Status: fixed on main by PR #1894 (commit 760c08f), shipped in v0.10.9, per the maintainer. A hard-killed daemon or worker could leave a markerless .sock/.anc pair plus an unheld version-cohort lock in the per-user rendezvous directory /tmp/cbm-daemon-; activation now runs a serialized stale-generation cleanup before classifying state.
For 0.10.8, the workaround that two commenters confirmed is:
bashps aux | grep -i codebase-memory-mcp codebase-memory-mcp daemon status rm -rf /tmp/cbm-daemon-$(id -u) codebase-memory-mcp installAfter removing the directory,
daemon start,config getandconfig setworked again without reinstalling. The blocker is stale on-disk coordination state, not a live process:ps,daemon status,lsofand lock-file checks can all be clean while install still fails. One commenter noted that a worker killed mid-index left the generation reservation unreleased, which then blocked every runtime entry point too. Another observed that install exits with code 0 even when "no activation was committed", so scripted updates should not rely on the exit code alone. The maintainer asked that if the problem still occurs on v0.10.9, report it with the output ofdaemon statusand the contents of /tmp/cbm-daemon-.Did this work for you?What @Tomauskasz tried on GitHub (Worked)
On 0.10.8, daemon start timed out with 'CBM daemon could not start within 30000 ms' after only printing version_cohort.claimed_unheld. Running rm -rf /tmp/cbm-daemon-$(id -u) resolved it immediately; daemon start, config get and config set all worked right after, no reinstall needed.
Did this work for you?What @LinRds tried on GitHub (Worked)
On 0.10.8/macOS 15, reproduced the failure with zero active clients; the event log showed the drain failing while the installer observed daemon_active_clients:0, and install exited 0 despite 'no activation was committed'. Removing /tmp/cbm-daemon-501 cleared both install/update and daemon start failures at once.
Did this work for you?What a GitHub user tried on GitHub (Outcome unclear)
The issue reporter documented this workaround: after verifying no CBM processes exist and daemon status says 'not running', run rm -rf /tmp/cbm-daemon-$(id -u) and retry codebase-memory-mcp install. The thread does not state whether the reporter ran it; it is presented as a workaround for anyone hitting the issue.
Source: https://github.com/DeusData/codebase-memory-mcp/issues/1760 (opens external site)
Did this work for you?What @gitokato tried on GitHub (Outcome unclear)
Reported a different symptom: the same stale state blocked all runtime entry points with 'CBM CLI could not start because a pre-coordination or unverified CBM generation is active', with the stuck artifacts being the cbm-version-cohort-*-v1.lock family. Raised the question of whether PR #1894 also clears version-cohort claims that block the runtime guard, or only the install/update path.
Did this work for you?
Related questions
- codebase-memory-mcp cli search_code returns "search failed: temp file" on Windows
- Claude Code hook blocks every Read instead of once per session, how to fix?
- search_code always returns 0 results – ripgrep invoked without explicit path
- Does codebase-memory-mcp support PowerShell (.ps1, .psm1, .psd1) files?
- codebase-memory-mcp PreToolUse hook blocks Read/Grep on non-code files