- The paper demonstrates the main contribution is a two-phase memory agent that proactively reinserts behavior-critical states to counteract decay.
- It employs selective memory injection based on sliding window context evaluation to balance timely intervention with minimal distractions.
- Empirical evaluations reveal significant pass@1 accuracy improvements across benchmarks, validating the approach in diverse long-horizon tasks.
Proactive Memory Intervention for Long-Horizon Language Agents
Long-horizon tasks for LLM agents, such as multi-step command-line operations or interactive tool use, present a central challenge: required execution state that should guide future actions frequently ceases to do so. The authors diagnose this as behavioral state decay, where requirements, discoveries, or diagnoses—although initially captured—no longer reliably influence agent behavior as trajectories grow. This issue cannot be resolved by expanding context length alone, as information may persist in the transcript but become functionally inert. Existing retrieval-augmented or persistent memory solutions focus primarily on storage and recall, but not on timely, targeted reactivation of decision-relevant state.
The authors reframe agent memory as a control-theoretic intervention problem: memory must learn not just what to store or retrieve, but when to inject information into the action loop so that it productively modulates the agent’s immediate decisions, minimizing redundant intervention and spurious distractions.
Architecture: Two-Phase Proactive Memory Agent
The proposed solution is an auxiliary memory agent, operating alongside an unmodified action agent, with the following architecture:
- Phase 1: Memory Bank Management—The memory agent maintains a structured memory bank, partitioned into status, knowledge, and procedural entries. Updates occur through explicit tool calls (e.g., save knowledge, save procedural, update status, delete).
- Phase 2: Selective Intervention—Conditioned on the updated bank and recent trajectory, the memory agent chooses either to inject a concise, memory-grounded reminder into the action agent’s next step, or to remain silent.

Figure 1: The memory agent operates in parallel, updating a structured memory store and deciding at regular intervals whether to inject reminders into the action agent’s context.
At fixed intervals, the memory agent observes a sliding window of the recent trajectory and bank state, enabling live evaluation of which (if any) execution state should be transiently reintroduced.
Key design constraints include:
- Interventions are concise, specific reminders, not generic advice or restatements of current context.
- Null intervention is explicit—the default is to remain silent unless the intervention is likely to affect the next action.
- No modification of the action agent or its tools—the system is modular and minimally invasive.
Empirical Evaluation
Benchmarks and Experimental Protocol
The memory agent is evaluated on two compositional, long-horizon agent benchmarks:
- Terminal-Bench 2.0: Autonomous command-line tasks demanding multi-step tool use, bug diagnosis, and environment inspection.
- τ2-Bench: Multi-turn agent-user-tool interaction in simulated real-world domains (airline, retail, telecom), with conversational context and dynamic environment constraints.
Metrics are strict pass@1 accuracy, with evaluation across weaker (Claude Sonnet 4.5) and stronger (Claude Opus 4.6) action agents. The main comparison is between baseline (no memory) and the proactive memory agent condition.
Main Results
The proactive memory agent consistently improves task success rates across all benchmarks and model scales. Notably:
- On Terminal-Bench 2.0 with Sonnet 4.5: pass@1 rises from 37.6% to 45.9% (+8.3 pp).
- On τ2-Bench (task-weighted average) with Sonnet 4.5: from 55.0% to 61.8% (+6.8 pp).
- Gains persist, though reduced, even with a stronger action agent (Opus 4.6: +2.4 pp and +2.5 pp for Terminal-Bench and τ2-Bench, respectively).
Domain-specific improvements were most pronounced in airline and retail subdomains for τ2-Bench.
Ablation Studies
Ablations isolate key factors:
- Full-bank context (removing selective intervention): Improves over baseline but trails the full two-phase agent, indicating that targeted, context-sensitive reminders outperform passive context augmentation.
- Always inject (forced reminder each step): Competes in some domains but is outperformed on macro-average, particularly where unnecessary interventions become distracting.
- Injection-only (no bank): Applies advisor-style guidance without persistent memory—yields unstable or degraded results.
- External memory retrieval (Mem0): Retrieval-based augmentation is helpful but notably less effective than targeted intervention, especially in domains requiring policy-sensitive reactivation.
The conclusion is that agentic maintenance plus learned intervention timing yields the most robust improvements, especially when domain constraints or environment facts must be reactivated at precise moments.
Qualitative Analysis
Qualitative tracing of trajectories demonstrates that successful interventions:
- Reactivate latent or faded execution state exactly before critical decision points (e.g., reminding of a requirement about to be violated, avoiding a previously failed command).
- Prevent policy violations and redundant error loops by surfacing high-precision, contextually-relevant messages.
- Are domain-adaptive: debugging continuity for Terminal-Bench, policy and entity-tracking for τ2-Bench.
Conversely, rare performance regressions primarily arise from overzealous speculation or redundant reminders—suggesting that intervention calibration, not memory storage, is the rate-limiting factor.
Learning and Transferability of Memory Policies
Beyond prompting, the paper investigates learning open-weight memory agents:
- Qwen3.5-27B is trained to imitate (SFT) and then refine (GRPO) the intervention policy, fixed action agent.
- On the SETA validation environment (terminal-agent tasks), SFT provides mild improvement, while reinforcement learning further increases reward.
- Out-of-domain transfer to Terminal-Bench yields an increase in pass@1 from 37.6% to 41.1% (+3.5 pp), indicating nontrivial generalization of the learned policy.
These results provide early evidence that memory intervention policies are partially learnable and transferable, and that downstream RL further aligns intervention timing to practical utility.
Theoretical and Practical Implications
This work articulates a paradigm shift: memory as a dynamic control policy rather than as a retrieval or summarization mechanism. The theoretical implications are:
- Persistent memory alone is insufficient for robust long-horizon planning—timely, behavior-driving recall is critical.
- The learnability of intervention timing suggests a rich interface between sequential decision making (RL) and symbolic memory in LLM scaffolds.
- The modularity and action-agent transparency enables plug-in memory systems, facilitating comparative research and scalable deployment.
Practically, the approach lends itself to:
- Augmenting existing agent frameworks without retraining or heavy modifications.
- Extending to complex agent-user-tool ecosystems where stateful reasoning and policy adherence are critical.
- Inspiring hybrid open-weight/closed-weight agent architectures, with memory policies independently improvable and calibratable.
Outlook and Future Directions
Open challenges remain:
- Joint training of memory and action agents may unlock global credit assignment, further increasing gains.
- Evolving away from fixed, periodic memory triggers towards learned, event-driven invocation might reduce unnecessary overhead and better match task dynamics.
- Dynamic abstraction of memory reminders—determining when verbatim records trump task-specific, abstracted summaries—remains inadequately explored.
- Application to multi-agent and open-ended settings, with memory state spanning large, evolving knowledge graphs, represents a fertile research direction.
Conclusion
This paper makes a strong empirical and architectural case for memory as proactive intervention in long-horizon language agents (2607.08716). The proposed two-phase agent demonstrably reduces behavioral state decay, leading to higher task success across compositional domains and LLM scales. The clear isolation of memory management and intervention, grounded empirical analysis, and initial demonstration of policy learnability together establish a new baseline and conceptual framework for agent memory design.