Who Schedules Agent Memory? A Sidecar Approach to Long-Horizon Tasks

Qijia Zhuang, Rui Liu, Yuxiang RenarXiv 2026

TL;DR

MemSidecar introduces a "sidecar" architecture that decouples memory scheduling from task execution for LLM agents. By using event-triggered Hooks and predictive Foresight, it delivers relevant historical context just-in-time, significantly improving accuracy and reducing execution latency in complex, long-horizon tasks.

What Problem Does This Paper Address?

As LLM agents move from simple Q&A to long-horizon tasks—like planning a multi-city trip or managing a software project—they increasingly rely on memory. However, most current systems use an "on-demand" approach where the main agent must identify its own memory needs, construct a query, and then wait for the results.

The authors identify three critical failure modes in this coupled approach:

  1. Retrieval not triggered: The agent simply forgets to look for relevant constraints (e.g., a budget set in a previous session).
  2. Serial memory access: The agent stops execution to wait for retrieval, adding significant latency to the "critical path" of the task.
  3. Incomplete queries: The agent lacks enough immediate context to form a query that captures all relevant historical dependencies.
Figure 1: Three failure modes in the XH hotel-booking task.

Methods

The core innovation is MemSidecar, a separate module that manages memory independently of the main agent's task loop. It utilizes a Dual-Layer Memory structure:

  • Global Memory: A topic-organized knowledge graph for information reusable across different tasks (e.g., user preferences).
  • Workspace Memory: A store for task-specific skills, progress, and artifacts (e.g., the current state of a flight booking).

MemSidecar operates in two complementary modes:

  • Hooks: This mode uses LLM-generated condition functions (predicates) bound to specific memory entries. When the agent's current state or a pending action matches a condition, the sidecar pushes the memory directly to the agent. It’s like a "mental note" that pops up exactly when you need it.
  • Foresight: An independent "ForesightAgent" predicts potential future queries based on the initial task instruction and a directory of available memory topics. It retrieves these results in parallel and stores them in a Task Cache, so they are ready the moment the main agent actually needs them.
Figure 2: MemSidecar framework. Global Memory organizes knowledge and user preferences reusable across tasks; Workspace Memory organizes workspace-specific skills, experience, and work state. Hooks directly delivers bound memory when exe- cution state or a pending action satisfies its condition; Foresight predicts queries from the task instruction and prepares a task-level cache in the background. The main agent uses the delivered context for task decisions.

Datasets

The authors evaluated MemSidecar on two challenging benchmarks designed for long-term agent memory:

  • MemoryArena: A benchmark containing 701 task sequences (e.g., web shopping, travel planning) that require connecting clues across multiple sessions and stages.
  • MCP-Persona: A dataset of 173 tasks involving stateful simulators for personal applications like email, social media, and collaboration platforms, requiring agents to use historical personal information.

Key Insights and Ideas

  • Scheduling is a First-Class Citizen: The paper argues that when and how memory is delivered is just as important as what is stored. Decoupling this logic from the main agent reduces the agent's "cognitive" overhead.
  • Parallelism Hides Latency: By predicting needs (Foresight), the system can overlap slow retrieval processes with the agent's planning and environment interaction, effectively removing retrieval from the critical path.
  • Event-Driven Context: Hooks allow for "just-in-time" delivery that doesn't rely on the agent's active reasoning to trigger. This prevents the agent from proceeding with an action that violates a forgotten constraint.
  • Dual-Layering for Scope: Distinguishing between global preferences and workspace-specific progress allows the system to maintain a cleaner, more relevant context window for the agent.

Key Results

MemSidecar demonstrated significant improvements in both task success and execution efficiency:

  • Higher Accuracy: On the MCP-Persona benchmark, Foresight achieved an overall score of 44.34%, and Hooks reached 41.23%, both significantly outperforming the strongest external baseline (DSH at 36.53%).
  • Reduced Latency: Hooks proved exceptionally efficient, completing tasks in an average of 82.5 seconds, compared to 147.3 seconds for the DSH baseline.
  • Robustness in Long Horizons: As tasks progressed to later stages, MemSidecar maintained a much steadier success rate compared to traditional systems like Mem0, which saw performance drop sharply as context became more complex.
  • Trainability: The authors found that training the ForesightAgent using Reinforcement Learning (SFT+RL) further boosted its score to 49.17%.

Limitations and Future Work

  • Complex Planning: While MemSidecar improved scores, "Complete-task success" remains low in highly complex domains like travel planning (under 5% SR), suggesting that memory scheduling is only one piece of the puzzle for truly autonomous agents.
  • Predicate Reliability: The Hooks mode relies on the LLM's ability to generate accurate condition functions. If the LLM generates a faulty predicate, the memory might never trigger.
  • Joint Scheduling: The current study evaluated Hooks and Foresight largely independently. The authors suggest that more sophisticated "joint scheduling" that combines the two modes more tightly is a promising future direction.

Summary updated

Abstract

As large language model agents increasingly undertake complex, long-horizon tasks, memory has become an important component for supporting sustained decision-making and action. Existing methods primarily focus on memory storage, updating, and retrieval, but often overlook how memory scheduling affects task execution: the main agent must identify memory needs, initiate retrieval, and wait for results while advancing the task, increasing both scheduling burden and execution time. To address this problem, we propose MemSidecar, which decouples memory scheduling from task execution through two independently selectable modes. Hooks directly delivers bound memory to the main agent when execution events match predefined conditions. Foresight uses an independent agent to predict potential queries, retrieve results in parallel, and store them in a cache, delivering matching and valid results when actual requests arrive. Hooks and Foresight achieve scores of 41.23% and 44.34% on MCP-Persona, respectively, while effectively reducing execution costs and latency and improving the efficiency of long-horizon agent execution.
BibTeX
@misc{zhuang2026who,
  author = {Qijia Zhuang and Rui Liu and Yuxiang Ren},
  title = {{Who Schedules Agent Memory? A Sidecar Approach to Long-Horizon Tasks}},
  year = {2026},
  eprint = {2611.00779},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.00779},
}

Loading related content...

Figure