PRO-LONG: Programmatic Memory Enables Long-Horizon Reasoning
Abstract
Long-horizon tasks require sustained perception, reasoning, and exploration, and are a persistent challenge for large language model (LLM) agents. This gap is reflected in their limited performance on continual learning benchmarks such as ARC-AGI-3 and NetHack, especially when evaluated without specialized harnesses. Various agent harnesses have been proposed to close the gap, and each commits to a strategy for handling long sequences of observations, i.e., what information to save from the environment and how to load it into model context, a choice we argue is particularly consequential. Existing methods for context management have typically been designed around a tradeoff, where preserving more information makes relevant details harder to retrieve. Recent progress in coding agents, however, makes new approaches to memory viable. We propose PRO-LONG, a minimal context management framework built around programmatic memory for LLM agents in long-horizon, exploratory settings. PRO-LONG addresses the tradeoff by keeping a complete, structured interaction log and using programmatic tools to search this history efficiently. On NetHack, we find increasing gains from using PRO-LONG for cross-episodic memory, with scores reaching up to 2.2x those of a base coding agent. On the full ARC-AGI-3 public game set, PRO-LONG improves over this baseline agent by an average of 18.0 percentage points across frontier models, and matches or exceeds state-of-the-art specialized harnesses (up to 97.4% best@2) while using 4.2-5.8x fewer tokens. Relevant code and logs are available at https://github.com/alexisfox7/PRO-LONG.
Create a lesson
Related papers
EvoLink-Bench: A Benchmark for Evaluating Self-Evolving Agents in Long-Horizon Interdependent Task Streams
Shared title terminologycs.AIWei Chen, Xiaodong Lu, Weihao Shen et al.
PROVE: Mitigating Long-Horizon LLM Collusion with Reinforcement Learning from Verified Evidence
Shared title terminologycs.AIHaochen Luo, Jie Fu, Mukai Li et al.
ExpGuard: Guarding Long-Horizon LLM Agents against Corrupted Experience
Shared title terminologycs.AIYuzhou Chen, Licheng Pan, Zhixuan Chu et al.
JANUS: Foreseeing Latent Risk for Long-Horizon Agent Safety
Shared title terminologycs.AIYuan Xiong, Linji Hao, Shizhu He et al.
XMind: Thinking Twice via Cross-Memory Reasoning for LLM-Based Autonomous Driving
Shared title terminologycs.AIZuyi Guo, Xianjie Dai, Lei Yang et al.
When Does Memory Help? A Cost-Aware Evaluation of Long-Term Memory in Tool-Using LLM Agents
Shared title terminologycs.AIShweta Mishra, Shashank Mishra