PRO-LONG: Programmatic Memory Enables Long-Horizon Reasoning

Alexis Fox, Junlin Wang, Paul Rosu, Bhuwan Dhingra
7/22/2026
cs.AI

Official code: alexisfox7/PRO-LONG (127 stars, last commit 2026-06-01).

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, especially when models are evaluated out of the box. Various agent harnesses have been proposed to close this 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 face a significant tradeoff, as preserving more information makes retrieving relevant details less tractable. 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 capitalizing on recent progress in coding agents to search this history efficiently. On the full ARC-AGI-3 public game set, PRO-LONG improves over a base coding agent by an average of 18.0 percentage points across frontier models, and matches or exceeds state-of-the-art specialized harnesses (up to 76.1% pass@1) while using 4.2-5.8x fewer tokens. With Fable 5, PRO-LONG achieves 97.4% best@2 at a total cost of \$1,750. Relevant code and logs are available at https://github.com/alexisfox7/PRO-LONG.

View on arXivView PDF

Code Implementations(1)

12720Shell, PythonMar 7, 20264 months ago

Similar Papers

Cite this paper

@article{fox2026prolong,
  title  = {PRO-LONG: Programmatic Memory Enables Long-Horizon Reasoning},
  author = {Alexis Fox and Junlin Wang and Paul Rosu and Bhuwan Dhingra},
  year   = {2026},
  eprint = {2607.20064},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2607.20064v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2607.20064.svg)](https://codeofpaper.com/paper/2607.20064)

Discussion