memlens Tracks Down Memory Retrieval Failures
Feisty_Dog_1198 · reddit · 2026-07-15
The author built a tool called memlens specifically designed to track down why an AI agent's memory retrieval "failed to recall."
The Problem Solved
- Existing memory tools usually only return the final relevant results.
- But during actual debugging, the more critical questions are:
- Was it never stored in the first place?
- Was the score too low?
- Was it silently filtered out by a threshold?
How memlens Works
- It doesn't handle retrieval itself; instead, it wraps a trace layer that logs the complete scoring and retention reasons for every candidate memory.
- It currently supports two adapters:
- mnemos: Natively exposes the true score of each candidate.
- mem0: Bypasses the public API's hidden thresholds to fetch all candidates first, then reapplies thresholds based on the actual logic to reveal the filtered-out candidates.
- It also provides a terminal viewer, memlens view trace.json, for easy trace inspection.
The author explicitly positions it as a debugging layer to "observe the true scoring process," rather than just another retriever that fabricates scores.
More from coding & agent
- OpenAI ships GPT-6.1 Terra; Brockman says its computer use now beats his own speed — gdb · 2026-10-27
- Kolab Benchmark Uses Pro Screen Recordings to Show AI Agents Overestimate Collaboration Quality — minnesotanlp · 2026-10-27
- Dev argues Claude burns far more tokens than GPT models for the same coding work — haider1 · 2026-10-27
- Stop building agents that can't change models: stable contracts, external state, real evals — rseroter · 2026-10-27
- Cheap models can cost more in agent harnesses than frontier ones, researcher warns — vasuman · 2026-10-27
- Kanzo: A 5k-Line Rust Kanban Binary With MCP for Claude Code and Codex — allmudi · 2026-10-27