Research / Technical Report · November 2026

Why agents forget to use their own memory tools

An empirical evaluation of explicit tool-based memory, asynchronous prompt wrappers, and synchronous execution-lifecycle hooks across 12 multi-turn and long-horizon benchmarks up to 10M tokens.

Evaluation Scope 12 suites · up to 10M tokens
Stateful Workflows (2,800 Turns) 52.3% → 96.5% (+44.2 pp)
DolphinBench (600 Tasks) 79.3% → 85.2% → 90.5%
Runtime Hook Overhead <10 ms · $0 LLM cost · 1.04x tokens
Abstract

Long-horizon agent failures past turn 20 frequently manifest as reasoning hallucinations, but root-cause traces show they are predominantly state and memory failures: context loss following window compaction and silent state staleness across sessions. We evaluate the two prevailing agent memory paradigms, explicit agent-invoked memory tools (tools_only) and asynchronous prompt-level wrappers (auto-memorize / auto-recall), and contrast them with ambient memory, an architecture that hooks synchronously into the four stages of the agent execution loop (UserPromptSubmit, PreToolUse, PostToolUse, Stop). Across a controlled 12-benchmark ablation spanning 600 DolphinBench tasks, 2,800-turn stateful workflows, 500 multi-tenant workspaces, and histories up to 10M tokens (LongMemEval, BEAM), synchronous lifecycle hooks eliminate post-compaction policy blindness (lifting 2,800-turn accuracy from 52.3% to 96.5% with zero tool invocations), while combining ambient hooks with explicit search tools (ambient_plus_tools) achieves state-of-the-art performance on 10M-token multi-session synthesis (90.5% on DolphinBench, 90.0% on Official LongMemEval, and 84.3% on BEAM 10M).

1. Introduction & problem formulation

Production agent architectures generally integrate persistent memory through one of two mechanisms: exposing explicit retrieval and write primitives (search_memories, add_memory) to the language model via MCP or function calling, or wrapping each conversational turn in an asynchronous background extraction and top-k prompt prepending pipeline (auto-memorize and auto-recall).

Both approaches degrade significantly under sustained task load. Consider an interactive software engineering session where a user establishes an invariant on turn 3: "Do not run raw SQL migrations on billing-service; always generate an Alembic revision first." Forty turns later, after inspecting several stack traces and compacting the context window, the user instructs the agent to ship an invoice schema update. Although the constraint remains indexed in the backing store, the model never invokes search_memories, because the prompt "Ship the invoice schema update" appears self-contained and exhibits no lexical cue indicating that a historical rule applies.

This failure mode generalizes across autonomous multi-session workflows whenever operational invariants are separated in time from downstream execution:

  • Autonomous infrastructure operations: During an autoscaling event, an incident-response agent does not proactively query whether the affected tenant was pinned to Frankfurt (eu-central-1) during a compliance audit six weeks prior.
  • Supply-chain & procurement workflows: When generating a restocking purchase order, a procurement agent does not know to query whether quality assurance placed the vendor on a defect hold in an earlier session.
  • Enterprise revenue operations: When drafting a multi-year renewal schedule, a quoting agent does not spontaneously search Q1 transcript archives for a custom rate-lock addendum.

Rather than treating memory as an optional tool call or an asynchronous prompt wrapper, we model agent state after operating system virtual memory, an architecture we term ambient memory. Just as an operating system pages memory into and out of physical RAM transparently underneath an executing process, an ambient memory runtime manages context injection, mid-turn scope transitions, pre-execution policy verification, and synchronous state supersession directly inside the agent execution loop.

Figure 1: The 4-Stage Ambient Execution Loop (vs. Prompt-Only Wrappers)
1. UserPromptSubmit
Prompt Ingress (<10 ms)
Resolves coreferences & injects active constraints in a prefix-cache-aligned block.
2. PreToolUse
Safety Gate (<1 ms)
Verifies tool arguments against polarity & numeric bounds prior to execution.
3. PostToolUse
Mid-Turn Watcher (<1.5 ms)
Detects files & entities accessed mid-turn and surfaces scoped invariants.
4. Stop
Sync Assimilation (<10 ms)
Extracts state updates synchronously ($0 LLM cost) & retires superseded facts.

To isolate the contribution of each architectural component, we conducted a controlled ablation across 12 evaluation suites (600 end-to-end DolphinBench tasks, 500 multi-project workspaces, 6 enterprise compliance verticals, embodied spatial tracking, and four long-horizon memory benchmarks: LoCoMo, LongMemEval, LongMemEval-v2, and BEAM up to 10M tokens), evaluating three configurations under identical model weights and evaluation harnesses:

  • tools_only: Explicit search_memories, add_memory, and forget_memory tools exposed to the model, with all runtime lifecycle hooks disabled.
  • ambient_only: Zero memory tools exposed to the model. State assimilation, supersession, context delivery, and pre-execution gating occur exclusively within the four runtime lifecycle hooks.
  • ambient_plus_tools: Runtime lifecycle hooks manage synchronous state updates, pre-tool verification, and Turn-1 grounding automatically, while explicit search tools remain available for targeted multi-hop retrieval.

2. Empirical failure analysis of tool-based memory (tools-only)

On explicit retrospective queries (e.g., "What port was configured for staging Redis?"), tools_only performs reliably because the user prompt explicitly instructs the model to retrieve historical state. Degradation occurs when state maintenance and recall must compete with active task execution across four failure modes:

0.0% Post-Compaction Survival

Once a standing constraint is evicted from the active context window during compaction, routine task prompts provide no signal that a policy exists. Across coding policy suites, tools_only exhibited 0.0% unprompted policy recall.

47.3% Write F1 Under Task Load

When a persistent constraint is embedded within an imperative instruction ("Keep webhook timeouts under 500ms and rerun pytest"), the model prioritizes immediate tool execution and omits add_memory on 52.7% of turns.

56.0% Stale-State Contamination

In append-only vector stores, querying after an entity mutation retrieves both prior and current states. On DolphinBench Stage 4 supersession tasks, tools_only resolved cross-turn state updates on only 12.5% of trials.

No Pre-Execution Interception

Because tool invocation is voluntary, a passive retrieval tool cannot deterministically intercept an agent prior to executing an out-of-policy side effect (such as issuing a $450 automated refund against a $50 authorization ceiling).

3. Systems limitations of naive auto-memorize & auto-recall wrappers

To bypass voluntary tool invocation, many frameworks wrap the chat completion endpoint in an asynchronous background extraction queue (auto-memorize) paired with unconditional top-k embedding injection at prompt ingress (auto-recall). Our systems profiling identifies three structural bottlenecks in this design:

A

Asynchronous LLM extraction latency, handoff races, and post-compaction staleness

Conventional auto-memorize pipelines invoke an auxiliary LLM in the background to extract facts and reconcile graph edges, incurring $22+ in API overhead per 600-task DolphinBench run and introducing 2 to 15 seconds of ingestion lag. When a parent agent mutates state and immediately compacts context or delegates to a subagent, the subagent reads stale state before the extraction queue settles. Furthermore, without synchronous write-time retirement, top-k vector recall re-injects superseded rules alongside current ones.

B

Cosine polarity blindness (70-100% compliant false-alarm rate) & cache invalidation

Consider a stored policy: "Never deploy PII tables to us-east-1; always deploy PII tables to eu-central-1." When an agent executes a compliant call deploy_table(table="users_pii", region="eu-central-1"), bi-encoder embeddings and cross-encoder rerankers measure high lexical overlap with the prohibition rule, flagging 100.0% (Cosine-RAG) and 70.0% (Cross-Encoder) of compliant actions as policy violations while inflating prompt token consumption by 5.20x through prefix-cache invalidation.

C

Inability to observe mid-turn tool execution loops

Prompt-level auto-recall executes only once per turn at UserPromptSubmit. In agentic workloads, roughly 80% of state interactions occur mid-turn across sequences of 5 to 30 tool calls, where the agent inspects files, database schemas, and service configurations that were not referenced in the initial user prompt.

Table 1: Architectural Comparison Across Agent Memory Paradigms

Systems latency, token overhead, state consistency, and verification characteristics across the three evaluated paradigms.

System Dimension Explicit Tools (tools_only) Prompt Wrapper (auto-recall) Ambient Hooks + Tools
Write Consistency & Latency Opt-in (omits 52.7% of rules) Async LLM queue (2-15s lag) Synchronous (<10 ms)
Ingestion LLM API Cost $0 (consumes extra agent turn) ~$22+ per 600 tasks $0 (zero aux LLM calls)
State Supersession Append-only (56% stale error) Eventual / LLM-dependent Write-time retirement
Pre-Tool Safety Gate None (cannot intercept) 70-100% false-alarm rate <1 ms (0.0% false alarms)
Mid-Turn Tool Grounding Manual search only Blind to mid-turn tool reads Auto PostToolUse hook
Prompt Token Overhead 1.00x baseline ~5.20x (breaks prefix cache) 1.04x (cache-aligned)

4. Experiment 1: Multi-turn workflows, isolation & policy enforcement

We first evaluated tools_only, ambient_only (zero memory tools exposed to the model), and ambient_plus_tools across eight multi-turn operational, coding, spatial state, and compliance benchmark suites:

Table 2: Multi-Turn Workflow, Workspace Isolation & Policy Benchmarks (Suites 1-8)

Controlled 3-mode ablation comparing explicit tools, pure lifecycle hooks, and combined hooks + tools.

Benchmark Suite Scale / Horizon Tools-Only Ambient-Only Ambient + Tools
1. DolphinBench Full Suite 600 tasks (1,920 checks) 79.3% 85.2% 90.5% (vs. 70.7% Mem0)
2. DolphinBench Lifecycle 192 tasks (S1-S5) 78.7% (0% S4) 99.5% (100% S4) 99.5% (100% S4)
3. Conversational Assistant 2,800 turns (7 sessions) 52.3% 96.5% 96.5% (+44.2 pp)
4. Multi-Project Isolation 500 projects (9,952 turns) 47.3% F1 / 81.9% Isol. 96.2% F1 / 100% Isol. 97.3% / 100% Isol.
5. Production Coding 2,500 symbols 0% policy / 85% recall 100% policy / 92.5% 100% policy / 95.0%
6. Enterprise Compliance Gate 6 verticals (180 audits) 70-100% false alarms 100% block / 0% FP 100% block / 0% FP
7. Embodied Spatial Tracking 300 physical mutations 44.0% location acc 100.0% (0% stale) 100.0% (0% stale)
8. Surgical GDPR Unlearning Tenant / fact purge Re-index required 6.41 ms (100%) 6.41 ms (100%)

Analysis of Experiment 1

1. Pure lifecycle hooks (ambient_only) resolve single-workspace state tracking without tool invocations: By executing synchronous state supersession on Stop and deterministic context injection on UserPromptSubmit and PostToolUse, accuracy on the 2,800-turn assistant benchmark increases from 52.3% to 96.5%, and DolphinBench composite accuracy reaches 85.2% (exceeding Mem0's 70.7% baseline by +14.5 percentage points with zero explicit memory tool calls).

2. Explicit retrieval tools contribute +5.3 percentage points on multi-session aggregation: On the full 600-task DolphinBench suite, combining ambient_plus_tools improves composite score from 85.2% to 90.5%. Examination of per-task traces indicated that this gain concentrated in multi-session synthesis queries, motivating Experiment 2.

5. Experiment 2: Long-horizon multi-session synthesis (up to 10M tokens)

To evaluate how runtime lifecycle hooks and explicit search primitives interact when conversational history scales to millions of tokens, we conducted the same 3-mode ablation across four long-horizon memory benchmarks: LoCoMo, LongMemEval-v2, Official LongMemEval (35,628 nodes), and BEAM at 1M and 10M tokens.

Table 3: Long-Horizon Memory Benchmarks Up to 10M Tokens (Suites 9-12b)

Comparison of Tools-Only, Ambient-Only, and Ambient + Tools across multi-session conversational and 10M-token synthesis benchmarks.

Long-Horizon Suite Corpus Scale Tools-Only Ambient-Only Ambient + Tools
9. LoCoMo Multi-Session 19 sessions, 419 turns 85.8% QA / 84.3% R@20 86.7% QA / 86.6% R@20 86.9% QA / 94.5% R@20
10. LongMemEval-v2 200 trajectories, 451 QA 60.8% R@5 (62.4 LAFS) 92.5% R@5 (93.8 LAFS) 95.1% R@5 (+34.3 pp)
11. Official LongMemEval 2,300 sessions, 35,628 nodes 76.0% 83.2% 90.0% (+14.0 pp)
12. BEAM (1M / 10M Mean) 1M & 10M token horizons 72.1% 79.3% 86.4% (+14.3 pp)
12a. BEAM 1M Tokens 1,000,000 tokens (6,020 nodes) 74.0% 80.9% 88.4% (vs. 59.0% Mem0)
12b. BEAM 10M Tokens 10,000,000 tokens (20,561 nodes) 70.3% 77.8% 84.3% (vs. 48.6% Mem0)

Division of labor: Ambient hooks as the map, explicit tools as the microscope

When a query requires synthesizing evidence distributed across six distinct sessions within a 35,000-node archive (for example, reconstructing a timeline of schema incidents across Q1, Q2, and Q3), each ablation mode exhibits a distinct retrieval dynamic:

  • Unanchored search in tools_only (microscope in a dark room): Lacking initial entity or session anchors in the prompt, the model formulates a generic initial search query that retrieves high-frequency lexical distractors across all 35,000 nodes.
  • Bounded Turn-1 injection in ambient_only (map without a microscope): To preserve prefix-cache alignment and bound prompt overhead (~1,300 tokens), the UserPromptSubmit hook injects only the top-5 state-consistent memories. While this single-pass grounding elevates LongMemEval-v2 Recall@5 from 60.8% to 92.5% without tool calls, multi-session aggregation queries spanning 6 to 8 distinct historical episodes exceed the capacity of a compact Turn-1 injection block.
  • Guided multi-hop retrieval in ambient_plus_tools (map guiding the microscope): Because the Turn-1 ambient block populates the prompt with primary session IDs, canonical entity names, and temporal anchors, the model identifies the exact missing evidence hops and issues 1 to 2 targeted search_memories calls, raising Official LongMemEval accuracy to 90.0%, BEAM 1M to 88.4%, and BEAM 10M to 84.3%.

6. Conclusions & citation

1

Voluntary tool calls (tools_only) are insufficient for invariant persistence

Language models executing multi-step action plans omit voluntary add_memory calls on implicit constraints 52.7% of the time (47.3% Write F1) and do not invoke search_memories for unknown-unknown policies following context compaction (0.0% survival).

2

Execution-lifecycle hooks require synchronous state retirement and polarity awareness

Asynchronous LLM extraction queues lag behind subagent handoffs and context resets, while cosine similarity prepending invalidates prefix caches (5.20x token cost) and misclassifies 70% to 100% of compliant actions as policy violations.

3

Ambient lifecycle hooks and explicit search tools are complementary

Synchronous hooks (UserPromptSubmit, PreToolUse, PostToolUse, Stop) provide deterministic state assimilation, policy gating, and Turn-1 grounding, while explicit search tools enable targeted multi-hop synthesis across 10M-token histories.

bibtex
@techreport{slashml2026ambient,
  title       = {Why Agents Forget to Use Their Own Memory Tools: A 12-Benchmark Study of Ambient Runtime Memory},
  author      = {SlashML Research},
  institution = {/ ml (SlashML)},
  year        = {2026},
  month       = {November},
  url         = {https://slashml.ai/research/ambient-memory.html}
}