PRO-LONG: Programmatic Memory Enables Long-Horizon Reasoning

August 6, 2026 · View on GitHub

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

Architecture

Setup

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 .

# codex backend
docker build -t rgb-agent/codex-sandbox:latest docker/codex-sandbox
docker build -t rgb-openai-proxy docker/openai-proxy

# claude-code backend
docker build -t rgb-agent/claude-sandbox:latest docker/claude-sandbox
docker build -t rgb-anthropic-proxy docker/anthropic-proxy

Create a .env file:

ARC_API_KEY=...
ANTHROPIC_API_KEY=...   # claude-code backend
OPENAI_API_KEY=...      # codex backend

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

Usage

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/.

Key flags

FlagDefaultDescription
--backendcodexcodex (OpenAI Codex CLI) or claude-code (Claude Code CLI)
--suiteGame suite: ls20, vc33, ft09, or all
--gameComma-separated game names or IDs, as an alternative to --suite
--max-actions500Max actions per game
--model, -mclaude-opus-4-6Base model; set one matching the backend
--efforthighEffort level (claude-code backend)
--reasoning-effortnoneReasoning effort (codex backend)
--operation-modeonlineonline / offline / normal

Memory conditions

The agent's access to game history is controlled by --log-window and --workspace. These are the ablation conditions from the paper:

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

Scorecards & logs

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.

Architecture

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.

Citation

@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},
}