Skip to content
 
 

Repository files navigation

PRO-LONG

PRO-LONG is a small, local persistence layer for everyday long-horizon Codex tasks. It gives each task a durable record, readable continuity note, and append-only Codex event log, so a task can be resumed deliberately instead of relying on chat history alone.

The task and its files remain local. PRO-LONG does not send task state to a hosted service and does not manage credentials; Codex continues to use its normal local authentication.

Install

Requires the Codex CLI on PATH, Git, and Python 3.12+.

curl -fsSL https://raw.githubusercontent.com/EternaPeptix/PRO-LONG/main/install.sh | bash

The installer places the checkout in ~/.local/share/prolong, its isolated Python environment alongside it, and the command in ~/.local/bin. If needed:

echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
exec zsh

Everyday use

From the workspace you want Codex to modify:

prolong "Audit the API, fix the flaky test, and leave a verified handoff"

That starts one bounded codex exec run in the current directory with workspace-write access. It also works for an ordinary (non-Git) folder. A record is created at ~/.local/state/prolong/tasks/<task-id>/:

  • task.json — workspace, status, model, timestamps, and captured Codex session ID.
  • CONTINUITY.md — durable human-readable handoff for the next run.
  • run.jsonl — raw Codex event stream for every run.

Continue deliberately after a pause, interruption, or review:

prolong list
prolong status 20260806-123456-audit-the-api
prolong resume 20260806-123456-audit-the-api "Address the reviewer feedback and rerun the focused tests"

Autonomous task coordination

For a long reasoning task, give PRO-LONG a finite run budget. After every Codex run, the harness reads the model's explicit PROLONG_STATUS control line: continue, completed, or blocked. It continues only on continue, stops immediately on completion or a blocker, and stops safely if the marker is missing. The task record and append-only event log are therefore the coordinator's durable state, rather than just a history of manual invocations.

prolong --max-runs 12 "Investigate the intermittent failure, fix the root cause, run relevant tests, and leave a verified handoff"

If the budget is reached while work remains, its state becomes budget_exhausted; extend it deliberately:

prolong resume 20260806-123456-investigate-the-failure --max-runs 8

Use --condense with an autonomous run when you want each continuation to begin from the concise local handoff instead of an increasingly long Codex thread:

prolong --condense --max-runs 12 "Work through this long investigation methodically"

For a Dense-style, token-saving continuation strategy, opt in when creating the task:

prolong --condense "Investigate this intermittent failure over several work sessions"

Normal tasks resume the saved Codex thread, so the full thread history remains available. A condensed task keeps the durable CONTINUITY.md handoff and raw local run.jsonl, but every later prolong resume launches a fresh Codex session. The next agent is instructed to use the compact handoff rather than an accumulated conversation. Before pausing a condensed task, make sure its continuity record names the completed work, verification, unresolved questions, and exact next step.

Use a specific workspace, model, or sandbox per task when useful:

prolong -C ~/src/service -m gpt-5.6-sol --effort xhigh --sandbox workspace-write "Prepare the release"
prolong init -m gpt-5.6-sol --effort xhigh --sandbox workspace-write

prolong defaults to gpt-5.6-sol with xhigh reasoning and workspace-write access. prolong init saves only local defaults in ~/.local/state/prolong/config.json; per-task flags override them. read-only is useful for audits; danger-full-access should be chosen only when the task explicitly warrants it.

Recursive Language Model mode

prolong rlm is a real, bounded Recursive Language Model runner. A root Codex call receives a durable local context environment and an exact, run-local delegate launcher for fresh, focused child calls. Delegates inherit the same context and can delegate again. The coordinator, not the model prompt, enforces the total-call and recursion-depth budgets; this also prevents a stale globally installed prolong executable from hijacking a delegate.

prolong rlm --max-depth 2 --max-calls 8 "Investigate this codebase, delegate independent checks, then synthesize a verified answer"
prolong rlm --context ./incident-notes.md --submodel gpt-5.6-luna "Find the root cause of this incident"

Each run is retained under ~/.local/state/prolong/rlm/ with run.json, CONTEXT.md, raw model events, and an append-only execution-tree event log. max-calls includes the root call, so --max-calls 1 disables delegation. The task and all RLM state remain local.

Legacy ARC evaluator

The upstream ARC-AGI-3 implementation is preserved but is no longer the everyday default:

prolong swarm --suite all -m gpt-5.5 --max-actions 500

Install legacy dependencies only when using it:

pip install 'prolong[arc]'

About

Programmatic memory for long-horizon LLM agents: the harness appends everything to one log, and the agent searches it with code. 97.4% on ARC-AGI-3 (arXiv:2607.20064)

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages