mirror of
https://github.com/DeusData/codebase-memory-mcp.git
synced 2026-11-04 10:48:20 +00:00
The search hook gives each Grep, Glob or Bash search the matching graph symbols, but a session can keep searching text for questions the graph answers in one call (#509). Once a session has run three searches with no codebase-memory-mcp tool call, the next augmentation now adds one factual line saying so. The next note comes after six searches, then twelve, and any graph tool call resets the count. - State: a per-session counter in the process that runs hook requests (the daemon), keyed by the payload's session_id, in a bounded 64-slot table that evicts the least recently used session, behind a spin lock. Only searches that reach the graph lookup count. A search without an augmentation still counts, and the note waits for the next augmentation. - Reset: Claude's managed PostToolUse entry now matches "Read|mcp__.*codebase-memory-mcp__.*", covering plain and plugin server names. The previous Read-only entry, as installs up to v0.12 wrote it, is recognized as owned, so install replaces it in place and uninstall removes either. - Scope: Claude Code only. Codex sends the same event payload with a turn_id but has no reset hook, so its sessions are not tracked, and payloads without a session_id are not tracked either. - Cost: a graph tool call now runs one hook round-trip to the daemon for the reset, about 130 ms on a local build. Refs #509 Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>