My agent kept "forgetting" things mid-conversation found a technique that actually solves it (LCM)

Reddit r/AI_Agents Tools

Summary

Lossless Context Management (LCM) from the Voltropy paper offers a technique to prevent AI agents from forgetting information in long conversations by storing all messages verbatim in SQLite while feeding the model compressed summaries, enabling retrieval of exact details without loss. The openlcm library provides a drop-in replacement for LangGraph's MemorySaver and supports other frameworks.

I've been building a multi-step research agent, and after about 30–40 turns, I keep running into the same problem: the model starts contradicting itself, forgets hard constraints, and asks for information that was already provided. I've tried the usual approaches, but they all have significant limitations: Summaries / handoff.md \- Too lossy. \- Important details inevitably get dropped. LangGraph MemorySaver \- Great for persisting state across restarts. \- Doesn't solve context-window overflow. \- You still hit token limits. Rolling summarize-and-replace \- Eventually becomes a summary of a summary of a summary. \- Fine-grained details disappear over time. A Better Approach: Lossless Context Management (LCM) I've been reading about Lossless Context Management (LCM), introduced in the Voltropy paper. The core idea is straightforward: context compression shouldn't require destroying information. I recently found openlcm ("pip install openlcm"), which implements this approach. Every original message is stored verbatim in SQLite, while the model is given a compressed hierarchy of summaries. The result is that the model operates on a small, efficient context window but can still retrieve the exact text of a decision made dozens of turns earlier. Unlike traditional summarization approaches—or Claude Code–style compaction—there isn't an inherent "compress = lose information" tradeoff. For LangGraph users, it's essentially a drop-in replacement for "MemorySaver": from openlcm.adapters.langgraph import LCMCheckpointer graph = StateGraph(MyState).compile( checkpointer=LCMCheckpointer(llm=my\_llm) ) It also supports AutoGen, CrewAI, and direct OpenAI/Anthropic integrations. One feature I particularly like is the local dashboard, which lets you inspect exactly what the model sees versus what has been summarized out of the active context. Thought I'd share since I don't see LCM discussed very often, and it seems like a promising direction for long-running agent workflows.
Original Article

Similar Articles

Tiny Basic for Arduino

Hacker News Top

Tiny Basic for Arduino is a lightweight, portable BASIC interpreter for mid-range Arduino boards and MCUs, featuring an in-hardware code editor and a comprehensive built-in standard library for hardware I/O, math, and bit manipulation.

Canonical's CVE Response Times

Lobsters Hottest

Discussion of Canonical's response times to CVE vulnerability disclosures, highlighting concerns about patching speed for Ubuntu and related packages.