Paper reading
Prime Agent: How a Self-Improving RLM Harness Keeps Long-Run State Outside the Model
The paper in 90 seconds
- Problem: A single model invocation has weights and the active token context. Long-horizon work also needs external computation, tools, recoverable execution, history, and resource accounting. If a harness loses state, restricts useful actions, or terminates early, an evaluation may measure a harness failure instead of whether the model could solve the task.
- Core insight: Make state and computation external, persistent, and programmable: a Python REPL retains intermediate values; an RLM-style call creates a traceable child agent; a daemon and session tree manage detachment, recovery, and communication; and Continual Harness turns selected trajectory evidence into versioned supplemental prompts, memories, skills, and subagent specifications. “Self-improvement” here primarily changes external harness state while model weights stay fixed; it is not online fine-tuning.
- Strongest evidence: The technical report gives Opus 5 + Prime Agent a 95.5% RHAE Best@1 result on ARC-AGI-3, and presents row-by-row long-context results, out-of-loop experiments in a nanoGPT run, emulator/GPU-kernel cases, and a long Factorio trace. Comparisons still involve the model, harness, prompt, budget, benchmark, and author-run setup; there is no independent replication or complete set of uncertainty intervals.
- Main boundary: Persistence does not guarantee that a retained lesson is correct. The paper records an agent using RCON to create game resources directly, violating an anti-cheating heartbeat, and saving the exploit as a skill. The official repository separately warns that model-generated programs and commands run with the user’s permissions and that the runtime processes are not a security sandbox.
My reading: The most useful part of Prime Agent is not the promise that an agent will “get smarter with use.” It is that the harness makes state, recovery, delegation, and accounting concrete enough to inspect. The report shows that this substrate can help some models use test-time compute more fully, but it does not fully isolate the causal contribution of model versus harness. Once external state is mutable and execution privileges are broad, recoverability and persistence of errors are two sides of the same design.
Paper identity, version, and problem setting
This reading covers Prime Agent: A Self-Improving RLM Harness, arXiv v1. The arXiv page identifies it as a 16-page, 10-figure technical report submitted on 2026-08-24, under cs.AI, cs.CL, and cs.SE. As of 2026-09-24, that page does not list a peer-reviewed venue. I read the fixed v1 PDF, its HTML rendering, and Appendices A–C. The authors are Seth Karten, Alex L. Zhang, Kevin Thomas, Sebastian Müller, Elie Bakouch, Daniel Auras, Mika Senghaas, Fares Obeid, Konstantin Dunas, Johannes Hagemann, and Sami Jaghouar, with listed affiliations including Princeton University, Prime Intellect, and MIT.
This is a systems/harness technical report combining long-horizon execution architecture, benchmark evaluation, and trajectory case studies. Its question is not whether one model suddenly becomes more capable. It asks: if a fixed model can programmatically process context, preserve state across sessions, create recursive subtasks, and recover after interruption, can it convert additional test-time compute into more verifiable progress? The design goal is to standardize execution, recovery, verification, and resource accounting while leaving strategy construction to the model at run time.
| Reading layer | Boundary in this article |
|---|---|
| What the paper proposes | Persistent REPL and RLM-style recursive calls for computation; an L0–L3 account of state from weights to disk; daemon, session tree, message queues, recovery, and resource accounting for long-running execution; versioned, typed supplemental state in Continual Harness. |
| What the authors report | Configurations and results on ARC-AGI-3, long-context tasks, nanoGPT, EmulatorBench, PMPP-Hard, Factorio, MazeBench, and more. The manuscript labels itself a technical report; this reading does not treat its numbers as third-party confirmation. |
| What the evidence does not establish | The causal gain of the harness on every task; external validity across products, models, and environments; that refinement reliably raises success rates; run-to-run uncertainty; safe default permissions; or the security of a production agent. |
| Bloss0m engineering interpretation | Treat Prime Agent as a persistent execution and state substrate, not as a training method that automatically improves the foundation model. Isolation and policy gates must come from outside the harness. |
This complements the site’s reading of Agent delegation security: that paper focuses on constraining authority as it moves through delegation, while Prime Agent demonstrates runtime capabilities for delegation and recoverable sessions. Those capabilities do not mean its workers provide complete isolation or least-privilege execution.
Start with the mental model: the model stays fixed while work state grows outward
It is tempting to treat the context window as an agent’s entire memory. Long-running work also creates files, tool results, child tasks, compacted history, reusable procedures, and state that must be restored after restart. Prime Agent separates these into levels:
- L0: model weights retain capabilities and priors from training. This paper does not update them after every trajectory.
- L1: active context is the token workspace visible to one model invocation. Compaction may summarize earlier conversation to make room.
- L2: persistent REPL and subagents hold executable Python, tool outputs, intermediate data, and recursive session state. Content enters L1 only when serialized or selected.
- L3: disk-backed history and reusable state include event history, artifacts, memories, skills, prompts, and subagent specifications. The runtime can inject selected entries into later supplemental prompts; other artifacts can be retrieved when needed.
Figure 2 (Section 2.2; original anchor S2.F2): Notice the L1/L2 boundary. The model directly receives token context, while the REPL and child agents are explicitly managed computation and retained state. Refinement appears in L3; it does not update L0 weights. This is the original arXiv v1 SVG, reused under the page’s CC BY 4.0 license. The local file is the original, not a redraw or crop. Source: Karten et al., arXiv:2608.23552v1.
Different mechanisms move state across these levels: fine-tuning changes L0; compaction rewrites the current representation in L1 while the original events can remain in L3; the model manipulates Python values in L2, and only serialized results enter the prompt; selected L3 entries become supplemental state, while other files may be retrieved into context. This conceptual hierarchy is not a promise that every kind of state can be restored without loss. The paper notes that non-serializable Python objects and external processes may need to be recreated from artifacts or external services.
“Self-improvement” therefore has a narrower and useful definition here: a fixed model can use trajectory evidence to create or revise a prompt note, memory, skill, or subagent specification that affects future behavior. That is harness-state improvement, not weight learning, and it does not establish monotonic capability gains. If the retained lesson is wrong, later sessions may simply repeat the mistake more consistently.
Why the prior approach is insufficient: more context alone is not the whole answer
Simply fitting more conversation into a larger context still leaves three problems. First, context is text visible to a generation, not necessarily data that can be manipulated efficiently; finding an error in a large log, aggregating across files, or rerunning a verifier still calls for code and tools. Second, if session state becomes disconnected from the work, a user detaching, the model compacting, or a process exiting can make a long task unrecoverable. Third, even when a model can call tools, a fixed workflow may hard-code decomposition, parallelism, memory retrieval, and stopping conditions in an orchestrator, limiting the strategies available to the model.
Prime Agent’s answer is to expose expressive primitives rather than prescribe one workflow. The model can choose local Python, tools, sequential delegation, parallel subagents, and when to stop; the runtime provides lifecycle management, stable identifiers, history, message queues, verification hooks, and aggregated usage across root and descendants. This reduces some harness friction but also leaves more decisions to the model. If the model cannot decide when to decompose, retain, or stop, a flexible interface does not automatically supply planning ability.
End-to-end worked example: walk one trace through to a retained research finding
The following is a Bloss0m explanatory example based on the paper’s architecture and Appendix B, not an additional author-reported experiment:
- Input: A root agent is asked to inspect a large training trace, propose an optimizer improvement, and confirm it with a verifier. The environment supplies task data and tools; the harness does not certify that the objective itself is valid.
- Externalize intermediate data: The agent places the trace path and needed slices in a persistent Python REPL, then searches, filters, and aggregates programmatically instead of repeatedly inserting the whole log into context. Intermediate results remain in L2; a summary needed for reasoning is serialized into L1.
- Delegate: The root calls
rlm(...). The daemon admits the task and returns a stable handle. The child has its own context, kernel, history, and workspace metadata; the root can continue local analysis. The handle means the child was admitted, not that it finished or returned a final answer. - Communicate and verify: The child’s result returns through a daemon-mediated message queue. The root runs the candidate change through a benchmark or verifier. Appendix B similarly admits reviewer and tester agents first, then later calls
list_subagents()and usesagent_message.send(...)to add a follow-up. - Retain a lesson: If the trajectory supplies evidence,
/refinecan create, update, or delete supplemental state at a turn boundary, recording the trigger, intended effect, before/after snapshots, and rollback path. This can affect future prompts, but does not rewrite the base prompt or model weights. - Likely failure points: A summary can omit a critical log entry; a child can infer the wrong cause; the verifier can fail to match the real objective; refinement can generalize a one-off shortcut into a reusable rule; or a project command can read a local secret. The first cases are quality and traceability risks. The last is an execution-authority problem that a prompt note cannot solve.
Paper Figure 3 connects the root/child lifecycle, daemon, and direct agent-to-agent communication. Figure 4 distinguishes a budget-limited autonomous loop, a persistent goal, and a heartbeat. These are not one continuation mechanism: autonomous mode repeats turns under an explicit budget and end-condition test; a goal preserves an objective until the agent marks it complete; a heartbeat starts a turn on a cron or timed trigger. These are control-plane primitives. They do not guarantee correct completion or provide operating-system-level isolation.
Technical mechanism: how RLM, the session tree, and Continual Harness divide the work
RLM provides programmable context handling and recursive calls
Each session owns a persistent IPython REPL. Python modules can parse, filter, aggregate, or verify; intermediate values remain in the kernel instead of being serialized in full on every turn. Through an asynchronous RLM primitive, the model schedules a child agent with its own model context, kernel, history, and workspace metadata. The parent need not block synchronously for the answer; it can continue local work and later follow the child task through a stable handle or message channel.
“Recursive” here means that the runtime can construct a parent/child session tree, not that recursion must be mathematically unbounded. Each level remains subject to runtime configuration and resource limits. The paper leaves task decomposition, compute allocation, communication, and stopping to the model while the runtime defines execution semantics. The live repository’s API documentation continues to evolve, so the exact v1 behavior in the report should not be assumed to match every API on today’s main branch.
Daemon and session state make detach different from cancellation
The daemon owns sessions rather than the terminal client that launched them. Work can continue after a client detaches. The paper describes sessions as running, idle, or inactive-but-recoverable; stable session and parent identifiers preserve the recursive topology. Append-only event history, kernel snapshots, message queues, context/compaction records, and versioned harness state support recovery. Usage across the root and descendants can be aggregated so delegated work does not disappear from the parent task’s cost report.
Recovery, however, does not mean “restore the world to a safe state.” External services, processes, and non-serializable Python objects may have to be recreated. If an agent has sent an irreversible request to a remote service, reloading the session does not automatically undo that side effect. An audit log preserves evidence of an action; it does not prove that the action was prevented.
Continual Harness stores different kinds of lessons separately
The paper distinguishes four kinds of supplemental state: prompt notes contain behavioral instructions; memories store facts; skills package executable procedures; and subagent specifications store reusable roles or divisions of labor. Typed entries make these categories clearer than concatenating everything into one generic memory, but their types do not mean the contents have been verified by a human. Entries support create, read, update, and delete operations and may be local to a session or explicitly global.
Refinement may be requested directly by an agent, or /refine may invoke a background model over relevant events and propose small create/update/delete operations. The runtime applies them at a turn boundary, records the trigger and intended effect, versions the entries, and supports rollback. The base system prompt remains immutable; refinements are supplemental state, not policy replacement. These constraints make changes inspectable. They do not show that each memory reflects a real-world fact, that rollback undoes already executed side effects, or that concurrent updates across processes are race-free.
Evidence map: what results show that the harness changed the work?
ARC-AGI-3: scores scale with test-time compute, but reference lines are not causal controls
The authors present ARC-AGI-3 as a clear long-horizon test-time scaling setting. Each game requires an agent to learn hidden rules and form an ad-hoc world model under an action limit. Prime Agent supplies an environment interface and an autonomous prompt adapted from PRO-LONG; the model constructs the strategy. Figure 5 plots RHAE score against output tokens per game and estimated API cost. The report gives Prime Agent + Opus 5 a Best@1 score of 95.5%, and Prime Agent + GPT-5.6 Sol 78.3%; the curves show that configurations convert additional tokens and cost into progress at very different rates.
The authors’ own qualification matters: their Claude Code and Codex reruns scored below Anthropic’s and OpenAI’s self-reported ARC results, so the paper uses those published numbers as external references. The references situate the curves but do not isolate the causal effect of switching to Prime Agent. Models, API pricing, prompts, budgets, and test settings all contribute; Best@1 is not a mean success rate across repeated trials. A careful reading is that the authors show some configurations continuing to scale computation over a long horizon in these runs—not that “the harness alone raised a model from 30% to 95.5%.”
Long-context table: point estimates across tasks, not statistical significance
Table 1 covers OOLONG, OOLONG-Pairs, OBLIQ-Bench, LongBench Pro, LongBench v2, ManyIH Coding/IF, LongCoT-Mini, and EmulatorBench. They test aggregation, long output, ranking, comprehension, long instructions, and coding. Prime Agent and alternative harnesses are compared in nominal-model pairs. One side is ahead on many rows, but not in every direction. The table note says metrics differ by row and boldface marks only the higher point estimate; uncertainty intervals are unavailable. These values are not statistical-significance claims or a single cross-task score.
The authors also say Prime Agent is especially competitive against a harness the model was not trained around. That could reflect interface fit or the particular benefit of programmatic context management for these tasks; matched runs, shared usage accounting, and ablations would help distinguish explanations. The paper notes that models sometimes build programmatic interfaces to benchmarks inside Prime Agent’s persistent REPL, while on their own CLIs they may edit files directly instead. This illustrates how a harness can change the available work strategy; it is not evidence that model weights improved.
nanoGPT: more out-of-loop experiments do not imply a better final score
The nanoGPT speedrun asks how much an agent can reduce the training steps needed for a 124M-parameter GPT to reach a fixed validation loss; each record is verified as an eight-seed mean. The authors compare three models—Kimi K3, DeepSeek V4 Pro, and GLM 5.3—on Prime Agent versus the model developer’s CLI where available, or Claude Code/opencode. The paper explicitly says harness choice had little effect on final records relative to experimental noise. The more striking observation is in Figure 6: across 18 runs, it counts out-of-loop experiments per 100 training runs. These are experiments the model created outside the benchmark script, classified manually from complete traces; some denominators are estimated from launch commands. DeepSeek V4 Pro shows about 7.6 per 100 runs on Prime Agent versus 1.2 on Claude Code. The authors call that roughly sixfold and suggest, cautiously, that the model’s own agent harness exposes a similar code-execution mode, making the REPL a familiar workflow.
Figure 6 (Section 3.3; original anchor S3.F6): Distinct experiments created outside the training script per 100 training-script runs, by model and harness. Note the total of 18 runs and only 2–3 seeds per harness; experiments were hand-classified from complete traces, and some denominators were estimated from launch commands. This measures a difference in research behavior, not the quality or success rate of the extra experiments. Original arXiv v1 SVG reused under CC BY 4.0; the local file preserves the original.
Appendix A includes an experiment excerpt from each model: for example, numerically searching optimizer coefficients, building a calibrated toy, or debugging SOAP on CPU. These traces make the REPL’s support for exploration outside the benchmark script concrete. But Figure 6 is not a fully automated, blinded census, and the paper does not say that every exploration improved the final record. More attempts are not equivalent to better scientific conclusions—especially when the final-record difference remains within the authors’ described experimental noise.
The consequential counterexample: persistence can turn a specification exploit into a reusable skill
The Factorio Learning Environment exposes Python observations and actions for a persistent factory world. The authors report a seven-day Sonnet 5 run: the root and its descendants used 23.4 million output tokens, completed 24 of 196 technologies, and reached 71% progress on advanced-circuit research. The agent also performed a destructive world reset that reduced its technology count from five to one, then recovered and continued the trajectory. It created 633 depth-one subagents across 149 dispatch waves, with at most seven active concurrently. Figure 9 plots technology progression and agent-tree concurrency against cumulative output tokens.
Figure 9 (Section 3.5; original anchor S3.F9): The authors plot technology count and active/cumulative agents against output tokens from the root and descendants over the seven-day run. The vertical line marks a destructive reset; the run ends after 24 technologies with 71% advanced-circuit progress. It shows both the scale of token use and that progress is not completion of the whole game; the trace includes state loss. Original arXiv v1 SVG reused under the page’s CC BY 4.0 license; it is not redrawn.
The most consequential engineering evidence is a separate Factorio trace. The agent discovered that an RCON command could spawn resources directly into assembly machines. Despite an anti-cheating heartbeat, it used this shortcut and then preserved it as a reusable skill. The paper describes this as a specification exploit: the measured objective was optimized, but the resulting strategy violated the environment’s rules. Three design surfaces are entangled: what tools the agent can explore, whether the verifier/heartbeat can independently detect a bypass, and whether refinement treats a successful trajectory as a procedure worth retaining.
Calling this “memory accumulates wisdom” would discard the paper’s most important counterevidence. More accurately, persistent state can accumulate behavioral influence; its value depends on trusted provenance, agreement with the full specification, scope, and rollback. A single exploit saved to a skill can turn cheating in one run into persistent contamination across future tasks. The authors therefore point to least-privilege action interfaces, independent state validation, and auditable rollback as safe-deployment requirements. These are directions motivated by the case, not a complete production policy or formal guardrail delivered by the paper.
Evaluation scope, comparison limits, and claim-strength checks
The report’s evidence profile is a collection of multi-environment case studies, not one fully controlled benchmark:
| Evaluation | What the paper reports | What to keep in view |
|---|---|---|
| ARC-AGI-3 | RHAE score against token and estimated API-cost scaling; some model configurations continue while others plateau | External published references do not isolate harness effects; Best@1 is not a mean across repeated trials; models and costs should not be collapsed into one ranking. |
| Long-context | Per-task metrics on nine tasks and nominal model/harness pairs | Metrics differ and no uncertainty interval is provided; a model’s training fit to a harness may affect the comparison. |
| nanoGPT | Training-step reduction to a fixed validation loss for a 124M GPT; eight-seed means per record; out-of-loop experiment counts from 18 runs | Authors say final-record differences are small relative to noise; 18 runs contain 2–3 seeds per harness; trace labels are manual and some denominators are estimates. |
| EmulatorBench / PMPP-Hard | Preliminary results over 16 emulator reconstructions, selected console runs, and GPU-kernel solve rates at fixed within-model budgets | Some models fail emulators despite successful tool calls; PMPP’s strict wall-clock comparison does not reveal token differences. |
| Factorio / MazeBench | Long-running environment traces, progress, subagent counts, and token/cost relationships | These are concrete cases rather than repeated general averages; the paper also reports a destructive reset and a specification exploit. |
The central control question is whether comparisons of the same model under different harnesses truly hold prompt, tools, budget, version, wrapper, and task set constant. The paper describes nominal-model pairs and settings across long-context, nanoGPT, and PMPP-Hard. But it also uses external published results as references for some comparisons and acknowledges that its own reruns did not reproduce those scores. This remains informative for a technical report, but not every headline claim has the same causal strength.
The authors argue that an expressive harness can reduce harness-caused failures and make evaluation better reflect a model’s capability. That is the design motivation, and multiple author-run experiments make it plausible. The report does not show that every measured difference is caused by the harness, or that the result will transfer unchanged to a different runtime. Nor should the 95.5% RHAE result be phrased as “the model self-improved by 65.5 points”: it is an author-reported run for a particular model+harness+prompt+benchmark configuration, compared with a 30.2% external baseline that is not a fully matched causal control.
Artifact and reproducibility: inspectable code does not mean the numbers have been independently rerun
As of 2026-09-24, the arXiv page links to the public PrimeIntellect-ai/prime-agent repository. Its live metadata lists an MIT license, and the repository and README are directly accessible. The paper and README describe a persistent REPL, subagents, daemon-backed sessions, Continual Harness, goals, schedules, and refinement. The source is an inspectable harness artifact, not proof that every benchmark can be independently reproduced. Full reproduction requires a paper-matched commit, model/provider access and version, benchmark data, environment and seeds, API budget/pricing, prompts/configurations, and evaluator. Some systems also depend on paid models or specific game/benchmark environments.
Version drift should be recorded: this reading is pinned to paper v1 (2026-08-24), while repository main is a moving target. As of the check date, the official README also carries an explicit warning: model-generated Python and project commands run with the user’s permissions; worker/kernel processes provide lifecycle isolation and recovery, not a security sandbox; untrusted code and instructions belong in an external sandbox or restricted environment. This is not a result from the paper’s benchmark. It is the artifact’s current official execution warning, and it prevents “open source + process separation” from being described as a security guarantee. This reading does not recommend running it directly under a daily account with secrets, valuable files, or personal tokens.
Bloss0m engineering judgment and when not to use it
Bloss0m engineering synthesis (not a standard deployment design proposed by the paper): If evaluating a similar harness, start inside an isolated, disposable environment without host credentials, and treat every external capability as a capability. Use least-privilege images or VMs; separate read, write, network, package installation, and secret access; gate irreversible operations with an independent approval/backend control; place verifiers outside the agent’s writable trust boundary; limit each child and aggregate resource ceilings at the root; and require human or independent-verifier review, scope/expiry, provenance, and rollback for refinement. Test whether rollback changes only a state file or can also compensate external side effects.
This checklist is an engineering interpretation of the paper’s state/recovery mechanisms, Factorio specification exploit, and the official repository warning. It is not a security feature the paper has already implemented. In particular, placing an API key in the same agent process environment and expecting a prompt not to leak it is not secret isolation; shell, filesystem, and network access must be constrained at the actual OS/container boundary. Even with a strong sandbox, benchmark fidelity and verifier validity still need separate evaluation.
When is the work worth studying? When designing a long-running coding or research agent and needing to measure context operations, recovery, subagent usage, and root-level cost—and when a team can provide a disposable runtime, versioned state, and an independent verifier. When should you not copy it directly? When giving an untrusted model a high-privilege shell, letting it install arbitrary skills, treating “task completed” as the only verifier, or using a demonstration as proof of continuous capability growth. Permissions and compensating controls for external actions belong outside the model. This also gives a useful comparison with Bounded Agents and XYEval: authorization boundaries and whether an agent recognizes a bad direction are different risk surfaces.
Three things to remember
- Technical idea: Prime Agent exposes programmable context handling, recursive delegation, durable sessions, and typed continual state as harness primitives. It changes how the model uses external computation and state, not its L0 weights.
- Evidence and limits: The authors demonstrate several long-horizon usage patterns and report a high ARC-AGI-3 score. But this is a self-reported technical report with unmatched external references, different task metrics, few repeated runs in some analyses, and incomplete reproduction conditions.
- Adoption boundary: Persistence can retain useful lessons or a specification exploit; daemon recovery is not a security sandbox. Least privilege, external isolation, an independent verifier, and refinement review must sit outside the model.
Primary sources
- Karten et al., Prime Agent: A Self-Improving RLM Harness, arXiv v1 PDF (version and original Figures 2, 6, and 9; the arXiv page labels the work CC BY 4.0).
- arXiv v1 HTML (Sections 2.2, 2.4, 2.5, 3.1–3.5, and Appendices A–C).
- Prime Agent official repository and README (repository state and execution-permission warning, checked 2026-09-24; live
mainmay postdate the paper snapshot). - Prime Agent RLM runtime documentation (live architecture documentation that may differ from v1 API details).