Files
codebase-memory-mcp/src/cli
Martin Vogel c52ca5d34c feat(hooks): name the graph follow-up tools in every search augmentation
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>
2026-10-19 23:52:05 +02:00
..