Pre-Prompt Semantic Injection Pattern
- Entity ID:
ent-20260419-a1c3e5f7b9d1 - Type:
concept - Scope:
shared - Status:
active - Aliases: automatic memory recall via hook, UserPromptSubmit memory injection
Description
Architectural pattern where memory retrieval fires automatically on every user prompt via a UserPromptSubmit hook, injecting the top-N relevant memories as plain text before Claude processes the message. Contrasts with the native Claude Code model where Claude must decide to call an MCP search tool (consuming tool-definition tokens and risking non-retrieval). Eliminates the failure class of Claude 'not thinking to search' and removes tool-definition overhead from the context window.
Key claims
- none yet
Relations
- Numeric Length Anchors (Anthropic-Only) --[implements]--> Pre-Prompt Semantic Injection Pattern
- Pre-Prompt Semantic Injection Pattern --[depends_on]--> Hooks System
- Pre-Prompt Semantic Injection Pattern --[supersedes]--> Grep Over RAG