Environment
- v0.9.0, darwin/arm64 (standard, non-UI variant), installed via
install.sh
- macOS on Apple silicon, 16 GB RAM
- Invoked through
cli only — the MCP server was never started, no watcher, no UI
- Cache:
~/.cache/codebase-memory-mcp, 266 MB total
Summary
With exactly two indexed projects, list_projects blocks indefinitely and never returns. It has to be killed. Every other tool on the same cache keeps working normally, so this is specific to multi-project enumeration — not a corrupt cache and not a stuck database.
Repro
# 1. Index project A (private Python monorepo)
$ cbm cli index_repository --repo-path /path/to/A --mode full
{... "nodes":81527,"edges":301976,"status":"indexed"} # 7.0 s
# 2. With ONE project in the cache, list_projects is instant
$ cbm cli list_projects
{"projects":[{"name":"...","nodes":81527,"edges":301976,"size_bytes":238682112}]} # < 1 s
# 3. Index project B (a second, smaller repo)
$ cbm cli index_repository --repo-path /path/to/B --mode full
{... "nodes":14478,"edges":50848,"status":"indexed"} # 1.3 s
# 4. With TWO projects, list_projects never returns
$ cbm cli list_projects
level=info msg=mem.init budget_mb=4096 total_ram_mb=16384
# ...hangs. Killed at 30 s, 180 s, and 335 s in three separate runs.
Reproduced 3/3 on a clean process table (all prior codebase-memory-mcp processes killed, no MCP server running).
Process state while hung
$ ps -eo pid,etime,%cpu,%mem,command | grep codebase-memory
1563 05:35 0.0 0.0 codebase-memory-mcp cli list_projects
2083 03:11 0.0 0.0 codebase-memory-mcp cli list_projects
0.0% CPU — blocked, not spinning. No log output beyond the mem.init line; ~/.cache/codebase-memory-mcp/logs/ stays empty.
Cache state (both DBs healthy)
40,501,248 <B>.db 32,768 <B>.db-shm 0 <B>.db-wal
238,682,112 <A>.db 32,768 <A>.db-shm 0 <A>.db-wal
Key discriminator — single-project access is unaffected
Immediately after killing the hung list_projects, both projects query fine:
$ cbm cli search_graph --project <A> --query "..." --limit 2 # rc=0, 44 ms
$ cbm cli search_graph --project <B> --query "..." --limit 2 # rc=0, 13 ms
So each database opens, reads and returns normally in isolation. Only the call that enumerates both hangs.
Impact
list_projects is the discovery entry point — the tool description for index_status explicitly tells callers to "Run list_projects to see indexed projects". Once a second project exists, an agent following that guidance blocks forever rather than getting an error, and there is no timeout or partial result to fall back on.
Relationship to existing issues (checked before filing; none appear to cover this)
Happy to gather anything further (sampled stack via sample, fs_usage, a CBM_CACHE_DIR-isolated two-project repro on public repos) if useful.
Environment
install.shclionly — the MCP server was never started, no watcher, no UI~/.cache/codebase-memory-mcp, 266 MB totalSummary
With exactly two indexed projects,
list_projectsblocks indefinitely and never returns. It has to be killed. Every other tool on the same cache keeps working normally, so this is specific to multi-project enumeration — not a corrupt cache and not a stuck database.Repro
Reproduced 3/3 on a clean process table (all prior
codebase-memory-mcpprocesses killed, no MCP server running).Process state while hung
0.0% CPU — blocked, not spinning. No log output beyond the
mem.initline;~/.cache/codebase-memory-mcp/logs/stays empty.Cache state (both DBs healthy)
Key discriminator — single-project access is unaffected
Immediately after killing the hung
list_projects, both projects query fine:So each database opens, reads and returns normally in isolation. Only the call that enumerates both hangs.
Impact
list_projectsis the discovery entry point — the tool description forindex_statusexplicitly tells callers to "Run list_projects to see indexed projects". Once a second project exists, an agent following that guidance blocks forever rather than getting an error, and there is no timeout or partial result to fall back on.Relationship to existing issues (checked before filing; none appear to cover this)
list_projectseager per-project work: ~61.5 s with 500 projects. That is linear slowness; this is an unbounded hang with 2. Pagination as proposed there would not fix a call that never returns.list_projectsdeadlock, but Windows-specific (gitvia_popenhandle inheritance) and via the web UI. This is macOS arm64 viacli, no UI.Happy to gather anything further (sampled stack via
sample,fs_usage, aCBM_CACHE_DIR-isolated two-project repro on public repos) if useful.