Long-horizon language agents that operate over extended interactions face a fundamental resource-allocation problem: they accumulate observations, reasoning traces, and retrieved facts that can exceed available context windows. According to a new paper on arXiv titled "Learning What to Remember: Observability-Safe Memory Retention via Constrained Optimization for Long-Horizon Language Agents" (arXiv:2606.10616), existing systems treat memory retention as a local decision and do not model the long-term consequences under observability constraints.
To address this gap, the researchers — Kang, Qingcan, Liu, Shixiong, Liang, Kaichao, Zhong, Tao, Yuan, and Mingxuan — formally define memory retention as a constrained stochastic optimization problem with budget feasibility, evidence utility, and delayed costs including miss, reacquisition, and stale penalties. They show that this multi-step problem is NP-hard, making exact solution intractable. Moreover, deployment decisions must be made under partial observability.
The OSL-MR Framework
The paper proposes OSL-MR (Observability-Safe Learning for Memory Retention), a learning-augmented framework that enforces a strict separation between online-observable features and offline-available supervision. OSL-MR combines an evidence learner trained from realized evidence with a Mixed-Score heuristic that serves as a deployable online-safe baseline and an inductive prior. The policy learns query-conditioned evidence from interaction data and remains deployable under the same observability constraints.
Experiments and Results
Experiments were conducted on two benchmarks: LoCoMo and LongMemEval. OSL-MR outperforms recency-based, Generative Agents-style, and other heuristic baselines, especially under tight budgets. The Mixed-Score prior improves precision and recall, and sensitivity analysis shows robustness across cost settings. On small solvable instances, single-step optimization is insufficient to anticipate future demand shifts, while OSL-MR stays significantly closer to the dynamic-programming optimum, confirming the necessity of the sequential formulation and reinforcing the learning-guided approximation.
Implications for Enterprise AI
While the paper focuses on fundamental research, the results have potential implications for any enterprise deploying long-running AI agents — for example, in customer service, research assistants, or autonomous workflows that must retain relevant context over time. The constrained optimization framework could inform how these systems manage memory under limited resources.
The authors conclude that these results establish constrained stochastic optimization and optimization-guided learning as a principled foundation for memory management in long-horizon agents.