Summary (Overview)

  • Recuris introduces a recursive Experiential–Working Memory (EM-WM) architecture for long-horizon LLM agents, where Working Memory (WM) tracks verified task progress and guides skill selection from Experiential Memory (EM), grounding skill use in current needs rather than full history.
  • The architecture turns execution into structured evidence, enabling component-level failure localization (64.8% accuracy vs. 13.0% from task outcome alone) and targeted, validation-gated memory evolution across tasks.
  • Across four long-horizon benchmarks and ten models (3B to frontier), Recuris improves task success in 35 of 37 completed model–benchmark pairs, with gains like +17.8 points on GPT-5.6 Sol and +15.6 on Claude Opus 5 on τ²-Bench (taking Opus 5 to 87.9%).
  • The advantage widens with interaction horizon (up to +32.2 points on longest tasks) and reduces common long-horizon failures by up to 80%.
  • The base LLM and outer improvement procedure remain frozen; recursion occurs entirely within the externalized memory-control layer, making improvements attributable, reversible, and portable across models.

Introduction and Theoretical Foundation

Background and Motivation

Large language model (LLM) agents increasingly rely on agent harnesses—external execution layers coordinating memory, skill invocation, task-state tracking, tool interaction, and verification. However, recursive self-improvement (RSI) remains challenging, especially in long-horizon tasks where goals, observations, and failures evolve continuously.

Key problem: As interaction histories grow, agents lose track of unresolved goals and invoke skills misaligned with the current task state. Existing experiential-memory methods retrieve skills from the initial instruction or full history, both of which become unreliable as execution unfolds.

Core Theoretical Insight

The authors argue that Working Memory (WM) provides the missing state representation. WM continuously tracks progress and unresolved goals, using them to select appropriate skills from Experiential Memory (EM), creating a closed loop:

Task StateSkill SelectionExecution FeedbackUpdated Task State\text{Task State} \rightarrow \text{Skill Selection} \rightarrow \text{Execution Feedback} \rightarrow \text{Updated Task State}

This EM–WM Coupling provides a stateful memory-control layer, grounding skill invocation in current needs. Critically, it also creates structured evidence for memory evolution:

EM–WM CouplingStructured EvidenceFailure LocalizationTargeted Memory Evolution\text{EM–WM Coupling} \rightarrow \text{Structured Evidence} \rightarrow \text{Failure Localization} \rightarrow \text{Targeted Memory Evolution}

Contrast with Prior Work

Unlike prior harnesses that:

  • Retrieve against growing chat history (losing track of unresolved goals)
  • Rewrite the entire memory from one task outcome

Recuris:

  • Retrieves at execution events with a checker verifying state updates
  • Attributes failures to specific components and patches only implicated ones, gated by validation on held-out tasks

Methodology

Problem Setup

The agent harness is built around a frozen LLM πθ\pi_\theta and tool set T\mathcal{T}. At step tt, the agent maintains interaction history hth_t and working state wtw_t:

atπθ(x,ht,wt,Et),ot=Env(at;T)a_t \sim \pi_\theta(\cdot | x, h_t, w_t, \mathcal{E}_t), \qquad o_t = \mathrm{Env}(a_t; \mathcal{T})

where ata_t is a user-facing message or tool call, and oto_t is the environment response.

Skill Memory Architecture

At evolution round kk, the evolving Skill Memory is represented as:

Mk=(Ek,Wk,ρk,Ck)\mathcal{M}_k = (\mathcal{E}_k, \mathcal{W}_k, \rho_k, \mathcal{C}_k)
  • Ek\mathcal{E}_k: Experiential memory storing reusable skills (agent-skill format)
  • Wk\mathcal{W}_k: Working-memory specification (state schema and update proposals)
  • ρk\rho_k: Invocation policy (when to retrieve skills, which entries enter context)
  • Ck\mathcal{C}_k: Checker set (tests whether observations support proposed state changes)

Within-Task: Verified EM–WM Coupling

Structured Working State

Each goal entry records content, status (pending/done/blocked), supporting evidence, and optional blocker. The state wtw_t exposes what's completed, what remains, and supporting observations.

State-Grounded Skill Invocation

Skills are retrieved at defined execution events:

Et=ρk(x,wt,et,Ek),EtEk\mathcal{E}_t = \rho_k(x, w_t, e_t, \mathcal{E}_k), \qquad \mathcal{E}_t \subseteq \mathcal{E}_k

Two deliverers are instantiated:

  • Call-time invocation: Fires when agent drafts a state-changing tool call; retrieves skill by tool name (used in τ² domains)
  • Boundary invocation: Fires at turn boundaries under state predicate (used in Terminal-Bench 2.1)

Evidence-Grounded State Update

The checker set evaluates proposed state changes against observations:

w~t+1=UWk(wt,at,ot),ct=Ck(wt,w~t+1,at,ot),wt+1=K(wt,w~t+1,ct)\widetilde{w}_{t+1} = U_{\mathcal{W}_k}(w_t, a_t, o_t), \qquad c_t = \mathcal{C}_k(w_t, \widetilde{w}_{t+1}, a_t, o_t), \qquad w_{t+1} = K(w_t, \widetilde{w}_{t+1}, c_t)

A goal moves to done only when Ck,g()=1C_{k,g}(\cdot) = 1 (explicit completion predicate on tool results, not model claims).

Cross-Task: Bounded Recursive Skill Memory Evolution

Trace-Based Failure Localization

The structured trace records (wt,Et,at,ot,w~t+1,ct,wt+1)(w_t, \mathcal{E}_t, a_t, o_t, \widetilde{w}_{t+1}, c_t, w_{t+1}) at every step. A fixed Meta-Agent attributes each diagnosed failure to a component:

Dk=Afixed(Γk,Mk)={(fj,zj)}j=1Jk,zj{E,W,ρ,C}D_k = \mathcal{A}_{\mathrm{fixed}}(\Gamma_k, \mathcal{M}_k) = \{(f_j, z_j)\}_{j=1}^{J_k}, \qquad z_j \in \{\mathcal{E}, \mathcal{W}, \rho, \mathcal{C}\}

Component-Specific Patching

One edit per implicated component, applied together:

Mk+=MkZk{Δmz}zZk\mathcal{M}_k^+ = \mathcal{M}_k \oplus_{Z_k} \{\Delta m_z\}_{z \in Z_k}

Only implicated components change; others are copied unchanged.

Validation-Gated Patch Admission

A fixed gate compares candidate against current memory on failed task and held-out dev set:

Mk+1={Mk+,if Gfixed(Mk+,Mk;xk,Ddev)=1Mk,otherwise\mathcal{M}_{k+1} = \begin{cases} \mathcal{M}_k^+, & \text{if } \mathcal{G}_{\mathrm{fixed}}(\mathcal{M}_k^+, \mathcal{M}_k; x_k, \mathcal{D}_{\mathrm{dev}}) = 1 \\ \mathcal{M}_k, & \text{otherwise} \end{cases}

Bounded Recursive Evolution

The complete loop:

MkΓkAfixedDkPfixed,ZkMk+GfixedMk+1Γk+1\mathcal{M}_k \rightarrow \Gamma_k \xrightarrow{\mathcal{A}_{\mathrm{fixed}}} D_k \xrightarrow{\mathcal{P}_{\mathrm{fixed}}, \oplus_{Z_k}} \mathcal{M}_k^+ \xrightarrow{\mathcal{G}_{\mathrm{fixed}}} \mathcal{M}_{k+1} \rightarrow \Gamma_{k+1}

The recursion is intentionally bounded: base LLM, Meta-Agent, localization/patching procedures, gate, and harness mechanisms outside Mk\mathcal{M}_k remain fixed.


Empirical Validation / Results

Overall Performance (Table 1)

Recuris improves task success in 35 of 37 completed model–benchmark pairs:

Modelτ²-Retail (Δ)τ²-Airline (Δ)SkillFlow (Δ)Terminal-Bench 2.1 (Δ)
Granite-4.1-3B+13.4†+5.5-0.3+2.5
Qwen3.5-4B+0.3+3.8+1.1+2.9
Qwen3.5-9B+2.0+2.9+3.4+3.1
GPT-OSS-20B+10.2†+4.5†+2.6†+2.8
Qwen3.6-27B+8.3†+1.0+16.6†+3.3
Qwen3.6-35B+0.3+1.3+13.5†+3.3
Gemini 3.7 Flash+4.8-1.5-+2.6
GPT-5.6 Sol+17.8†+7.0†-+3.2
Claude Opus 5+15.6†+1.0-+3.8
Doubao-2.0-Pro (deployment)+23.3†+5.0+16.8†+2.9

† marks paired task-clustered bootstrap 95% CI excluding zero.

EM–WM Coupling Analysis

Long-Horizon Reliability

  • Recuris leads base agent in all four quartiles of task length (+17.0 to +44.7 points)
  • Read-action recall stays at 88.0–97.9% for all variants (comprehension intact)
  • The gap is entirely on the write path: +26.7 points of required-write recall
  • Base agent ends 42% of write-requiring episodes having executed none; Recuris only 16%

Component Ablation (Table 2)

Variantτ²-Retail Success (Δ)τ²-Airline Success (Δ)
Base (no EM, no WM)58.1% (-)75.5% (-)
EM only60.1% (+2.0)77.0% (+1.5)
WM only82.0% (+23.9†)79.5% (+4.0)
Model-controlled invocation65.6% (+7.5†)-
EM + WM (Recuris)83.6% (+25.4†)84.0% (+8.5)

Key finding: The working state carries the level. EM alone adds little; WM alone adds most; coupling adds a bit more.

Double Dissociation (Figure 6)

The critical mechanism differs by domain:

  • τ²-Airline: Removing write review costs 13.5 points; status board costs nothing
  • τ²-Retail: Removing status board costs 17.3 points; write review costs 0.7

The truth guard (post-hoc audit) never matters—once a write executes, the environment has moved.

Invocation Control vs. Skill Content (Table 3)

MetricBaseWM onlyModel-controlledRecuris
Task success (%)58.182.065.683.6
Required-write recall (%)55.780.961.182.4
Omitted writes/episode0.5960.1450.4170.121
Agent tokens per success (k)116102147101

Model-controlled (all skills injected every turn) scores below WM-only and costs more. Availability is not the mechanism; state-grounded invocation is.

Recursive Evolution Analysis

Failure Localization (Table 4)

Injected-fault detection accuracy by evidence condition:

EvidenceE\mathcal{E}W\mathcal{W}ρ\rhoMacroMacro-F1
Outcome only0.038.90.013.010.4
Raw trajectory61.150.00.037.031.2
Structured trace Γ72.283.338.964.863.4

The gain is observability, not reasoning: invocation faults are non-events invisible in transcripts; WM record corruption visible only in state timeline.

Held-Out Gains (Table 5)

Every evolution run's evolved memory clears M0M_0 with interval excluding zero:

RunPackageSuccessΔ vs. M0M_0
M0M_0 (shared start)-54.07-
Run Around 265.99+11.92†
Run Bround 264.83+10.76†
Run CM2M_2 (admitted)71.51+17.44†

Iteration compounds: Run C's second round adds +6.98 on top of first. Run B's round-4 package fails because it's never invoked (0/86 tasks), a broken binding not diminishing returns.

Meta-Agent Interchangeability (Table 6)

Two independent Meta-Agent implementations (Claude Code vs. DeepSeek Harness) converge:

  • +11.92 vs. +10.47/+9.30 points (all intervals excluding zero)
  • Paired contrast: -1.45 points, CI [-7.85, +4.65], p=0.72 (inside instrument noise)
  • Both arrive at same component family: working-memory field for service-request authorization, execution-gate check, anti-escalation skills

Cross-Model Transfer (Table 7)

One package evolved on mid-sized deployment model lifts frontier models:

ModelDomainAgent alone+ RecurisΔ (95% CI)
GPT-5.6 Solτ²-Retail58.3376.10+17.76†
Claude Opus 5τ²-Retail72.3787.94+15.57†
Gemini 3.7 Flashτ²-Retail73.4678.29+4.82

The package is not a crutch for weaker models: strongest model ends highest (87.9%). Transfer depends on what the package carries: procedure (SkillFlow) transfers broadly; discipline (τ²-Retail) transfers where target model's failures make it valuable.

Test-Time Adaptation (Table 8)

On Terminal-Bench 2.1 (isolated tasks, no shared structure):

ConfigurationBudgetSolvedΔpIsolates
Terminus-2 (baseline)134.5%---
+ seed memory132.2%-2.30.824the layer alone
+ seed memory, retry458.6%+26.4<10⁻⁴attempt budget
+ test-time adaptation460.9%+2.30.774learning, matched budget

Critical decomposition: The attempt budget carries the headline (+26.4 points). At matched budget, adaptation adds +2.3 points (7 tasks won, 5 lost, p=0.774). Per-attempt success (untruncated rollouts) shows consistent direction: +4.5 points on learned tasks (avg@4), all four cuts moving +2.3 to +4.5 points.


Theoretical and Practical Implications

Theoretical Contributions

  1. State-grounded memory use as RSI requirement: Evolving task states demand continual alignment between accumulated experience and current execution needs—a compact, verified working state is essential.

  2. EM–WM coupling as structured evidence: The coupling transforms execution into diagnostic evidence, enabling component-level failure localization (64.8% vs. 13.0% from outcome alone) and targeted evolution rather than coarse rewrites.

  3. Bounded recursion: Recursion confined to the memory-control layer of a fixed harness is sufficient for meaningful self-improvement, avoiding the instability of unconstrained self-modification.

  4. Double dissociation of memory mechanisms: The critical memory component is a property of the domain, not the architecture—no fixed allocation of effort can be optimal everywhere, motivating trace-based repair targeting.

Practical Implications

  1. Memory as trainable surface: The memory-control layer, not weights, can serve as the trainable surface of a frozen agent—improvements are attributable, reversible, and portable across models.

  2. Frontier models are not saturated: GPT-5.6 Sol and Claude Opus 5 gain substantially on long-horizon tasks, showing headroom even at frontier capability.

  3. Efficiency: Recuris is more token-efficient (101k vs. 147k tokens per success vs. model-controlled) while achieving higher success.

  4. Safety: Gated updates preserve existing abilities (broke only 9.5% of dev anchor tasks vs. 25.9% null rate); rejected candidates are noise, not demonstrated gains.

  5. Deployment: One memory evolved once on a mid-sized model costs nothing to reuse across models—a practical path to scalable agent improvement.


Conclusion

Recuris reframes recursive self-improvement as an operation on an externalized memory-control layer rather than on the model or agent. Working Memory maintains a verified task state grounding skill invocation in Experiential Memory; the coupling emits structured traces; a fixed Meta-Agent localizes failures to components and patches only those implicated, behind a validation gate.

Key results:

  • 35/37 model–benchmark pairs improved across four long-horizon benchmarks and ten models
  • +17.8 points for GPT-5.6 Sol, +15.6 for Claude Opus 5 on τ²-Retail (Opus 5 at 87.9%)
  • +16.6/+13.5 points on Qwen3.6-27B/35B on SkillFlow
  • Advantage grows with horizon (+32.2 points on longest tasks), failures reduced up to 80%
  • Fault localization at 64.8% vs. 13.0% from outcome alone

Future directions suggested by the work:

  • Pruning operators for the growing memory (17 near-duplicate skill pairs survive into admitted versions)
  • The memory only grows; redundancy is currently a feature (robustness), but pruning could improve efficiency
  • Test-time adaptation shows promise on isolated tasks, with consistent per-attempt gains that warrant larger-sample validation

The authors position recursively evolving memory as a scalable foundation for RSI, enabling agents to continuously transform accumulated experience into increasingly effective long-horizon behavior while keeping the base model exactly as its provider shipped it.

Related papers