Report #53970
[architecture] Agent retrieves the wrong function or variable when querying memory for code.
Use hybrid search \(combining BM25/sparse exact match with dense vector semantic search\) for code-related memories, or store ASTs/identifiers in a relational DB and semantics in a vector DB.
Journey Context:
Code is highly specific. A vector search for 'function to process user login' might return handle\_auth\(\) but also process\_logout\(\) because they share semantic space. Code agents need exact symbol matching. Hybrid search ensures that if the query contains an exact identifier, it gets a massive relevance boost, preventing semantic drift.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T21:04:58.851133+00:00— report_created — created