cd /news/artificial-intelligence/programmatic-memory-for-long-horizon… Β· home β€Ί topics β€Ί artificial-intelligence β€Ί article
[ARTICLE Β· art-99656] src=github.com β†— pub= topic=artificial-intelligence verified=true sentiment=↑ positive

Programmatic memory for long-horizon LLM agents

PRO-LONG, a minimal memory addition for LLM agents that appends every observation, action, and outcome to a structured log.txt and retrieves it programmatically, improves performance on the ARC-AGI-3 public game set by 18 percentage points on average over the same coding agents without the log, matches or exceeds specialized harnesses at 4.2–5.8x fewer billed tokens, and reaches 97.4% best@2 with Fable 5 at a total cost of $1,750, according to a paper released by the developers on arXiv.

read3 min views2 publishedAug 17, 2026
Programmatic memory for long-horizon LLM agents
Image: Michielbdejong (auto-discovered)

PRO-LONG is a minimal memory addition for LLM agents on long-horizon tasks. The harness appends every observation, action, and outcome to a single structured log.txt, and the agent retrieves and reasons over it programmatically (grep, Python). There are no subagents or specialized retrieval mechanisms, and the system prompt is about 30 lines.

On the full ARC-AGI-3 public game set, PRO-LONG improves over the same coding agents without the log by 18 percentage points on average, matches or exceeds specialized harnesses at 4.2–5.8x fewer billed tokens, and reaches 97.4% best@2 with Fable 5 at a total cost of $1,750.

Paper: arxiv.org/abs/2607.20064

Requires Python (3.12 recommended) and Docker.

git clone git@github.com:alexisfox7/PRO-LONG.git
cd PRO-LONG
python -m venv .venv
source .venv/bin/activate
pip install -e .

docker build -t prolong-agent/codex-sandbox:latest docker/codex-sandbox
docker build -t prolong-openai-proxy docker/openai-proxy

docker build -t prolong-agent/claude-sandbox:latest docker/claude-sandbox
docker build -t prolong-anthropic-proxy docker/anthropic-proxy

Create a .env

file:

ARC_API_KEY=...
CODEX_API_KEY=...              # codex backend
CLAUDE_CODE_OAUTH_TOKEN=...    # claude-code backend (default)
ANTHROPIC_API_KEY=...           # claude-code backend with --api-key

The agent container only mounts the game workspace and, by default, has no network access except a proxy to the model API.

prolong-swarm --suite all -m gpt-5.5 --max-actions 500
prolong-swarm --suite all --backend claude-code -m claude-opus-4-6
prolong-swarm --game ls20,ft09 -m gpt-5.5

Results are written to evaluation_results/

.

Flag Default Description
--backend
codex
codex (OpenAI Codex CLI) or claude-code (Claude Code CLI)
--suite
β€” Game suite (all only)
--game
β€” Comma-separated individual game names or full IDs
--max-actions
500 Max actions per game
--model , -m
Backend-specific gpt-5.5 for Codex; claude-opus-4-6 for Claude Code
--effort
high
Effort level (claude-code backend)
--reasoning-effort
none
Reasoning effort (codex backend)
--operation-mode
online
online / offline / normal

The agent's access to game history is controlled by --log-window

and --workspace

. These are the ablation conditions from the paper:

Condition Flags History available
prolong (default) Full game log
lw25 --log-window 25
Last 25 action sections of the log
no-log (in-prompt) --log-window -1
No log file; the current board is added to the prompt
stateless --workspace stateless
Full log, but the workspace is wiped each call

scorecards/

contains the official online scorecards, including all 25 Fable 5 runs from the paper (fable_online_scorecards.txt

); each can be verified on arcprize.org. release_logs/

contains logs for the Fable 5 online runs: game logs, agent transcripts, and workspaces. Logs for the remaining ablations will be added.

prolong_agent/
β”œβ”€β”€ agent/
β”‚   β”œβ”€β”€ base.py               # base architecture
β”‚   β”œβ”€β”€ codex_agent.py        # Codex CLI backend
β”‚   β”œβ”€β”€ claude_code_agent.py  # Claude Code backend
β”‚   β”œβ”€β”€ swarm.py              # CLI entry point
β”‚   β”œβ”€β”€ action_queue.py       # action execution
β”‚   β”œβ”€β”€ game_state.py         # board/log formatting
β”‚   └── prompts.py            # prompts (~30 lines)
β”œβ”€β”€ environment/
β”‚   β”œβ”€β”€ arcagi3.py            # ARC-AGI-3 API wrapper
β”‚   β”œβ”€β”€ runner.py             # per-game loop
β”‚   └── config.py
β”œβ”€β”€ metrics/
└── utils/

This repo was formerly the Read-Grep-Bash (RGB) Agent, see our original blog post on the ARC-AGI-3 preview games.

@misc{fox2026prolong,
  title={PRO-LONG: Programmatic Memory Enables Long-Horizon Reasoning},
  author={Fox, Alexis and Wang, Junlin and Rosu, Paul and Dhingra, Bhuwan},
  year={2026},
  eprint={2607.20064},
  archivePrefix={arXiv},
  primaryClass={cs.AI},
  url={https://arxiv.org/abs/2607.20064},
}
── more in #artificial-intelligence 4 stories Β· sorted by recency
── more on @pro-long 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain β€” perfect for shipping the agent you just read about.

$git push zahid main
β†’ Live at https://your-agent.zahid.host βœ“
Get free account β†’ Pricing
from €0/mo Β· no card required
LIVE [news/programmatic-memory-…] indexed:0 read:3min 2026-08-17 Β· β€”