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.
Figures & tables
Figure 1. Three failure modes in the XH hotel-booking task.
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 execution 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.
Method
Shopping
Travel
Progressive Web Search
Reasoning
Cost per task ↓
SR ↑
PS ↑
SR ↑
PS ↑
SR ↑
PS ↑
SR ↑
PS ↑
Store (K)
Retrieve (K)
Time (s)
Memory systems
Mem0
1.33
48.78
0.00
1.02
11.31
12.07
26.67
47.95
39.53
6.43
789
A-Mem
0.67
44.78
0.00
0.48
9.95
9.99
21.67
42.95
55.34
7.31
1063
LightMem
1.33
51.22
0.00
1.50
13.57
14.99
28.33
52.95
23.72
7.54
715
Agent harnesses
Table 1. Main results on MemoryArena.
Method
Checkpoint score (%) ↑
Cost per task ↓
CP
CM
SM
EM
Lark
Rednote
Mixed
Overall
Store (K)
Retrieve (K)
Time (s)
Memory systems
Mem0
32.55
18.00
33.14
43.14
28.64
25.54
6.25
29.49
8.02
3.40
181.1
A-Mem
27.86
14.67
28.49
39.22
23.64
21.20
6.25
25.00
5.32
4.05
164.6
LightMem
35.16
20.67
35.47
45.10
31.59
27.72
18.75
32.18
3.81
1.94
139.8
Agent harnesses
Table 2. Main results on MCP-Persona.
Mode
Configuration
MCP-Persona
MemoryArena
Overall (%) ↑
Store (K) ↓
Retrieve (K) ↓
SR (%) ↑
Store (K) ↓
Retrieve (K) ↓
Hooks
Full
41.23
3.03
1.72
13.41
19.61
6.20
w/o W
36.46 (-4.77)
3.30 (+0.27)
1.92 (+0.20)
10.70 (-2.71)
21.29 (+1.68)
6.78 (+0.58)
w/o G
38.67 (-2.56)
3.21 (+0.18)
1.79 (+0.07)
9.84 (-3.57)
20.81 (+1.19)
6.81 (+0.61)
Foresight
Full
44.34
3.11
2.29
15.41
17.85
6.07
w/o W
38.12 (-6.22)
3.37 (+0.25)
2.59 (+0.31)
10.98 (-4.42)
19.32 (+1.47)
6.60 (+0.53)
Table 3. Dual-layer memory ablations.
Figure 3. MCP-Persona stage performance and retrieval intervention. (a) Early-, middle-, and late-stage checkpoint pass rates. (b) Original and extra-retrieval configurations of Mem0 and DSH, with standard Foresight as a reference; bars report Overall (%), Retrieve tokens (thousands), and runtime (seconds).
Figure 4. Execution trace of memory scheduling across stages in MCP-Persona task 153.
Appendix figures & tables4 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 8
Condition
Overall (%) ↑
Retrieve (K) ↓
Time (s) ↓
Untrained
44.34
2.29
109.7
SFT
46.27
2.58
119.8
SFT+RL
49.17
2.82
113.7
Appendix
Table B1. ForesightAgent training comparison on MCP-Persona.
Condition
MCP-Persona
MemoryArena
Overall (%) ↑
Store (K) ↓
Retrieve (K) ↓
Time (s) ↓
SR (%) ↑
Store (K) ↓
Retrieve (K) ↓
Time (s) ↓
only Hooks
41.23
3.03
1.72
82.5
13.41
19.61
6.20
535
only Foresight
44.34
3.11
2.29
109.7
15.41
17.85
6.07
617
Hooks+filtering
42.13
3.03
1.65
91.6
14.12
19.61
5.74
585
Hooks+Foresight
46.13
3.18
2.48
122.3
16.12
21.14
7.29
653
Appendix
Table B2. Single-mode, filtering, and joint-delivery comparison.