AI agents: harnesses, context, memory and dreaming

A model's behavior depends on the software around it, the information it receives, and what it retains between tasks. These notes compare several ways to improve that system, with links to the original articles, specification and technical report.

Sources checked on 9 October 2026; the forking and autonomous research section on 12 October 2026. Experimental numbers below are author-reported results, not independent reproductions.

Harnesses and context engineering

An agent harness runs the interaction loop around a model. It provides tools, constructs context, handles tool results and decides when to retry or stop. Context engineering determines what information reaches each model call, including instructions, retrieved documents, tool output and selected memories. Persistent memory stores information for later tasks; retrieval decides which parts belong in the current context.

The ultimate guide to multi-harness RL, by Adithya S Kolavi and colleagues, describes training inside existing harnesses with OpenEnv, Harbor and TRL. A capture proxy records generated tokens and their probabilities for reinforcement learning.

The authors trained LFM2.5-2.6B on 1,000 tasks and evaluated 250 held-out tasks under OpenCode, Claude Code, Codex and Mini-SWE-Agent. Average pass@1 rose from about 42% to 54.2%, with 31% fewer tool calls on tasks already solved by the base model. OpenCode-only training reached 52.3%; the authors say the 1.9-point overall gap is within noise. Transfer across individual harnesses differed. These task results do not establish general improvement across all coding benchmarks.

Clement Delangue's announcement describes the same training approach. Its full long-post text and outbound article link remain unverified. The independently retrieved guide is a web research article; its PDF export requires Pro access, and the authors identify the web version as canonical.

Learn harness engineering with WalkingLabs

An agent writes plausible code, announces it is finished, and leaves the next session to discover the missing tests. WalkingLabs' Learn Harness Engineering course starts with this gap between model capability and reliable execution.

“The agent says ‘I'm done’ when it's not”

WalkingLabs, Lecture 01

The course turns that problem into practical work: state clear completion criteria, give agents the right tools and project conventions, preserve progress across sessions, and verify the result. Lectures lead into hands-on projects and reusable templates for instructions, feature lists and progress notes.

Start with Project 01: prompt-only versus a minimal harness. Run a task with and without explicit rules and verification, then compare what actually works. This is an exercise you can reproduce in your own repository, rather than a promise that a particular harness will always improve performance.

Devin memory and Agent Memory Repo

Learning across sessions

Cognition's Memory and dreaming: how Devin learns from working with you, dated 5 October 2026, describes a personal Git repository of Markdown memories. A short MEMORY.md supplies general preferences and an index; sessions retrieve other notes as needed. Separate checkouts and revision checks protect concurrent updates.

Daily background dreaming reviews conversations and existing notes, merges duplicates, removes transient or stale material, and discovers lessons across sessions. Source references connect memories to earlier work. Skills package repeatable procedures; memory records lessons accumulated while using them. This is a product description without a controlled performance benchmark. The Cognition announcement links to the proposed format.

A proposed open memory format

Agent Memory Repo specifies an entry-point file, notes with optional source and date metadata, and wiki-style links between files. Agents clone the repository, retrieve relevant information, edit notes and push updates. Periodic dreaming can consolidate records and resolve contradictions.

Cognition describes it as an open standard. Here it is treated as Cognition's proposed open memory format, without assuming standards-body endorsement or broad adoption. The specification and implementation repository is open to contributions. Its local trial excludes automatic startup and scheduled dreaming. The website's agent-swarm and SQL examples illustrate intended use; they are not experimental evidence.

Dream-RSI: Recursive Self-Improvement through Evolving Worlds

Tong Zheng and colleagues, with affiliations at Google, the University of Maryland, Google DeepMind and the University of Virginia, describe Dream-RSI in a project page, technical report PDF and code repository.

Dream-RSI holds the discovery agent fixed and improves executable exploration policies. Online work produces discovery trees with recorded execution outcomes. Offline replay tests alternative search decisions against those trees; the selected policy returns online and expands the history. Dreaming here changes exploration code, whereas Devin dreaming curates text memory.

The project reports 2.43 times fewer generations on VGG16 at comparable performance, and 2.09 times higher performance on ConvDiv at comparable budgets. Its headline 162-fold reduction in Lasso discovery-agent calls compares 317 calls with SimpleTES's 51,200, using different models. That comparison does not isolate the exploration policy's contribution.

Replay covers only branches already explored. Selecting the best candidate, including the incumbent, prevents a lower selection score on recorded history; it does not guarantee improvement on unseen tasks. The site's statement that an agent must dream to self-improve is the authors' framing, not a demonstrated universal requirement.

Wake-sleep for legal agents

Niko Grupen's post links to The Return of Wake-Sleep. Public post metadata verifies that title, link and opening preview. The following details come from the supplied Pasted text.txt, whose complete article body was not independently retrieved.

The supplied account describes an agent working on legal tasks, then an offline review model deriving lessons from graded traces. It merges overlapping lessons, rejects client-specific or overly narrow entries through a Jev commit gate, and stores reusable checklists and practice notes for later tasks. This updates textual memory rather than model weights.

The authors report ten cycles across 196 Legal Agent Benchmark tasks in Corporate M&A and Capital Markets, with 110 training tasks and 86 validation tasks, using GPT-6 Luna as the agent. The all-pass rate rose from 2.9% to 15.7%, a 12.8 percentage-point increase. They report rubric-level gains on both familiar and new matters.

Memory also prompted about 2.5 times more analysis, checking and drafting tool calls, increasing cost and latency. Retrieving relevant lessons instead of supplying the full memory reportedly halved per-task cost while preserving the rubric-criteria pass rate. That efficiency comparison is against full memory, not the no-memory baseline.

These are rubric-judged benchmark results from the supplied account. They do not establish reliability on real client matters. Confidence intervals, independent replication and the full experimental artifacts remain unverified here.

Forking, swarms and autonomous research

Why fork an agent at all

Konstantin Dunas's On the Nature of the Swarm, dated 6 October 2026, starts from a limit of inference scaling: one agent's context window is fixed. Compaction helps only partly, because each summary is a lossy guess about what will matter later. Persistent sub-agents arranged as peers in a mesh, rather than as a tree under one coordinator, let total context grow with the number of agents. Communication cost sets the ceiling. This is an argument, not an experiment.

Ziyang Cai, Dimitris Papailiopoulos and colleagues study a related effect empirically in Fork-and-Flush: Escaping Idea Basins in Autoresearch Agents. Independent runs of the same research agent often plateau at very different scores, and the gaps persist with more compute. The authors call the regions where runs stall "idea basins". Fork-and-flush forks the agent into parallel copies that keep the accumulated workspace but start with a fresh chat context, runs each for a fixed horizon, then continues from the best. Across 13 long-horizon research and engineering tasks, the authors report higher normalized scores than single runs and best-of-N at equal compute.

The two sources pull in different directions. The swarm post keeps context in persistent agents; fork-and-flush deliberately discards chat context and keeps only the workspace. Neither settles how many copies to fork: that depends on the task horizon, the compute budget and how much a fresh context costs to rebuild.

Choosing the team's shape

Assemble Your Crew (ARG-Designer, AAAI) treats a multi-agent system's communication topology as something to generate rather than hand-design. It builds the collaboration graph node by node, choosing roles and who talks to whom, conditioned on the task. It addresses agent count and topology together, which the forking work above leaves open.

Training and self-improving harnesses

Prime Intellect's Multi-Agent Systems in PRIME-RL, dated 7 August 2026, extends an open RL training stack from single agents to interacting ones. Agent and Env abstractions define the interaction, a configuration chooses which roles are trained, and credit is assigned across the whole episode. This changes model weights, like the multi-harness RL guide above.

Prime Agent, dated 5 August 2026, is an open-source coding harness combining Recursive Language Models, which call sub-agents and manage context through a persistent REPL, with a harness that updates its own prompts, skills, memory and sub-agents during a task. Paired with Opus 5, the authors report 95.5% RHAE Best@1 on ARC-AGI-3, against a reported human expert baseline of 95.4%. That is a single author-reported result; the contribution of the self-updating harness, as distinct from the model, is not isolated here.

What autonomous research agents achieved

In Autonomous AI research for the nanoGPT speedrun, dated 14 May 2026, Codex and Claude Code ran roughly 10,000 experiments on the speedrun's optimizer track over about two weeks and set a new record of 2,930 steps. The authors found the agents strong at optimizer search and at combining known methods, but weak at generating new ideas without upstream human results.

Measuring Autonomous AI Research, dated 15 August 2026, follows up with 153 autonomous optimization runs across 18 models on the same speedrun. Models differed at every stage, from choosing experiments to interpreting noisy results. Fable 5 and Opus 5 performed best, and no model produced a fundamentally new method. The wide spread between runs is consistent with the idea basins that fork-and-flush targets.

Evidence limits and X threads

The sources improve different parts of an agent system. Multi-harness RL and PRIME-RL change model weights; memory dreaming revises stored notes; legal wake-sleep curates task lessons; Dream-RSI revises exploration policies. Their results use different tasks, baselines and cost measures, so the numbers should not be ranked against one another.

Engineering questions follow from those differences. Does a remembered lesson retain its source and scope? Can contradictory or stale notes be corrected? Does retrieval preserve quality while reducing cost? Does an improved policy transfer beyond the history used to select it? Answering these requires held-out evaluation and accounting for the offline work as well as online execution.

Highest-liked replies remain unresolved

The requested X threads did not expose a verifiable collection of reply bodies and like counts. No highest-liked reply summary is presented. A defensible ranking needs reply text, engagement counts and a collection timestamp; post popularity alone cannot establish which replies ranked highest.

Cognition's announcement and Niko's article link were verified through public post metadata. Clement's accessible text is truncated. The guide above matches its topic and claims, but the exact outbound link in the complete post remains unknown.

Original sources and further reading

Related notes on this site: multi-agent learning path, clinical reasoning and AI, and rfab-harness for antibody design campaigns.