codebase-memory-mcp
codebase-memory-mcp copied to clipboard
hook-augment misses common command prefixes (cd, VAR=, snip, run-logged, bash -c)
Summary
codebase-memory-mcp hook-augment (Claude Code + Codex PreToolUse Bash) skips env, nice, time, command, rtk, and tokf run before the search command, but not shapes agents emit often.
Version
Built from main @ 747665d (reports dev); also observed on 0.12.1.
Missed shapes
cd <dir> && rg <sym>(about a third of Claude Code Bash calls in one week start withcd)VAR=value rg <sym>andVAR=value; rg <sym>snip <cmd>,bash -c '<cmd>'- wrapper scripts that exec their argv (here
run-logged rg <sym>)
Expected
- Find the search term after a leading
cd X &&, environment assignments, andbash -c - Configurable pass-through wrappers (e.g.
CBM_HOOK_WRAPPERS=snip,run-logged) - For
cd X &&, resolve the project from X rather than the hook cwd
Context
We keep PreToolUse Bash on Claude and Codex with CBM_HOOK_DEADLINE_MS=3000 and a permanent daemon. Without these prefix skips, roughly a third of Claude Bash calls never get graph context even when the inner command is a real code search.