Memory Control Signals Emerge Before Action in Long Horizon Agents
Mingxuan Wang, Guorun Yao, Fei Luo, Yinglong Guo, Chao Ning, Bo Wang, Hongyue Chen, Yanbiao Ma, Jungong Han
Abstract
Long horizon language model agents continuously accumulate interaction history, increasing computational cost while making relevant information harder to preserve and reuse. Existing context management methods mainly focus on how to compress or retrieve history, but largely leave open whether the model itself already represents the need for these memory operations before they occur. We study the hidden state immediately before each agent action and find that compression and recall needs are already encoded in the model's internal representations. These signals cannot be explained by simple context length or interaction progress, and they exhibit distinct formation patterns across model depth. We further show that most memory decision information is preserved in a compact recent context, while selectively restored historical evidence complements the long range dependencies that recent context misses. Based on these findings, we propose Preaction Memory with Evidence Retrieval (PaMER), which combines state guided compression with external evidence retrieval. PaMER+ further introduces step level evidence selection to recover only the historical information required by the current task. Experiments on WorkBuddyBench, across multiple context management baselines and model backbones, show that our framework substantially reduces context consumption while maintaining competitive task performance.
Create a lesson
Metadata
- Comments
- 35 pages
Related papers
DMC-5: Dual-Model Collaboration with Cache-aware Context Compression for Long-horizon Agents
Shared title terminologycs.AIHaochen Li, Xiaobing Tu, Yinggui Wang et al.
HasMem: Hard-Origin Adaptively Softened Memory for Long-Term LLM Agents
Shared title terminologycs.AIZihong He, Junxiao Shen, Chen Liang et al.
When Can Agents Forget Their Reasoning? ICLR for Long-Horizon Agent Context Compression
Shared title terminologycs.AIMingxuan Wang, Fei Luo, Bo Wang et al.
C3M: Cross-Session Multimodal Memory Maintenance for Long-Horizon Tasks
Shared title terminologycs.AIXueshu Chen, Yan Wang, Zihao Xue et al.
Stable Geometry with Divergent Task Evidence for Efficient Long-Horizon Agent Compression
Shared title terminologycs.AIMingxuan Wang, Fei Luo, Bo Wang et al.
StateComp: Learning When to Compress History in Long Horizon Agents
Shared title terminologycs.AIMingxuan Wang, Hongyue Chen, Yinglong Guo et al.