Skip to content

Silent index corruption after rapid kill/restart cycles #334

@nguiaSoren

Description

@nguiaSoren

status:"ready" with ~5% of true node count

Version: codebase-memory-mcp 0.6.0
Platform: macOS

Reproduction (intermittent but reproducible during heavy session use):

  1. Multiple codebase-memory-mcp processes running concurrently (e.g.,
    multiple Claude Code sessions across the day)
  2. Rapid kill of one or more processes
  3. New session reconnects — MCP appears functional
  4. index_status reports status:"ready" with node count ~5-10% of true
    value (e.g., 469 nodes for a project with 5,915 true baseline)
  5. index_repository(mode="full") does NOT recover — repeated calls
    return same low count with status:"indexed"
  6. ONLY recovery: full /mcp disconnect + reconnect at the MCP client
    level, followed by index_repository(mode="full")

Why this matters: status:"ready" / status:"indexed" should not
report success when the index is catastrophically partial. Suggested
fix: validate node count against a plausibility threshold (or against
prior known-good state) before returning ready.

Diagnostic data: 38k LOC Rust codebase, 9 source files. True
baseline 5,915 nodes / 9,531 edges (verified via schema sum +
known-symbol probes across all source files). Corrupted state
returned 169-572 nodes / 165-555 edges across multiple rebuild attempts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions