Report #11136
[architecture] Coding agent embeds raw code snippets into long-term memory, but later fails to retrieve them because the natural language query doesn't match the code's syntax
Store dual representations: the raw code in a KV/object store, and an LLM-generated natural language summary of the code's purpose and context in the vector store. Link them via ID.
Journey Context:
Developers search for 'how I handled the auth retry logic', not \`if \(status === 401\)\`. Embedding raw code makes semantic search fail because embeddings map syntax, not intent. Summaries capture intent, which is durable. The tradeoff is that it requires an extra LLM call to summarize at storage time, and retrieval requires a two-step fetch \(search summary -> fetch code\).
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T12:39:16.045944+00:00— report_created — created