mirror of
https://github.com/DeusData/codebase-memory-mcp.git
synced 2026-11-04 08:13:37 +08:00
When an agent greps for a symbol that the graph knows, the PreToolUse augmentation (Grep, Glob and Bash searches) lists the matching symbols. It now closes with one line that is cbm's own statement, outside the untrusted symbol block, naming the graph tools for the usual next question: [codebase-memory] For these symbols, trace_path lists callers and callees, get_code_snippet returns the exact source, and search_graph finds related symbols by name. The line carries no repository-derived value and is stated as facts, as Claude Code asks of hook context. It is appended at the string's real end into reserved room: the list loop's offset can run past its cap when a row is truncated, so appending at that offset could have written past the buffer. Searches without a hit, errors and non-search events are unchanged. Refs #509 Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>