Skip to content

Claude Code Bash searches bypass codebase-memory hook augmentation #1082

Description

@abendrothj

Claude Code Bash searches bypass codebase-memory hook augmentation

Reproduction

With codebase-memory-mcp 0.9.0, invoke hook-augment with:

{"tool_name":"Grep","tool_input":{"pattern":"CreateStripeCheckout"}}

It returns four graph symbol matches.

Invoke it with the equivalent Claude Code Bash payload:

{"tool_name":"Bash","tool_input":{"command":"rg -n CreateStripeCheckout ."}}

It returns no graph context.

Claude Code commonly runs rg, grep, and find through the Bash tool, so code discovery silently bypasses graph augmentation when the PreToolUse matcher only covers Grep|Glob.

Expected behavior

Bash-based code searches should receive the same graph augmentation as native Grep searches, or the installer should provide a reliable Claude Code integration that detects these searches.

Workaround

A Bash PreToolUse adapter that extracts the search pattern, reshapes the payload as Grep, and forwards it to hook-augment restores the expected context.

This is an integration/installer issue: the MCP graph query itself works, but Claude Code's common Bash search path bypasses it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingeditor/integrationEditor compatibility and CLI integrationpriority/normalStandard review queue; useful PR with ordinary maintainer urgency.ux/behaviorDisplay bugs, docs, adoption UX

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions