Building agent memory with scope and recency as hard retrieval constraints
gentleforest325 · reddit · 2026-11-23
A developer recounts how a coding agent misdiagnosed an auth failure by citing a valid-looking OAuth doc that belonged to a different service — pure vector retrieval optimizes for semantic proximity, not ownership or validity. Their fix treats scope and recency as hard constraints at the retrieval layer: a scalar filter pins the service under investigation, keyword matching catches protocol/library names embeddings blur, and vector similarity handles loose semantics, all in one query plan via seekdb so scalar pruning happens before vector ranking. Decision changes are marked superseded and filtered to current records, keeping old entries queryable for audits. They now track wrong-service evidence and obsolete decisions as separate failure modes, arguing boundaries belong in the retrieval layer, not post-hoc application code.
More from coding & agent
- Z.ai unveils GLM-5.4 with first Loop Transformer, weights to be released — Zai_org · 2026-11-23
- Agentic fuzzing: repeated automated tests decide which code gets deleted — blixt · 2026-11-23
- MediaWiki MCP Server lets LLM clients edit, search, and manage any wiki — modelcontextprotocol · 2026-11-23
- Obsidian power user: it's agents on a structured vault, not note chatbots, that changed my work — dSebastien · 2026-11-23
- Dev shares expand-and-contract workflow: nightly agents that only delete code — blixt · 2026-11-23
- Dev prediction: AI coding is bringing waterfall development back — tlakomy · 2026-11-23