cs.AIApr 11, 2026

ClawVM: Harness-Managed Virtual Memory for Stateful Tool-Using LLM Agents

Authors: Mofasshara Rafique, Laurent Bindschaedler

Organizations: Independent Researcher Switzerland · Max Planck Institute for Software Systems Saarbrücken, Saarland, Germany

Abstract

Stateful tool-using LLM agents treat the context window as working memory, yet today's agent harnesses manage residency and durability as best-effort, causing recurring failures: lost state after compaction, bypassed flushes on reset, and destructive writeback. We present ClawVM, a virtual memory layer that manages state as typed pages with minimum-fidelity invariants, multi-resolution representations under a token budget, and validated writeback at every lifecycle boundary. Because the harness already assembles prompts, mediates tools, and observes lifecycle events, it is the natural enforcement point; placing the contract there makes residency and durability deterministic and auditable. Across synthetic workloads, 12 real-session traces, and adversarial stress tests, ClawVM eliminates all policy-controllable faults whenever the minimum-fidelity set fits within the token budget, confirmed by an offline oracle, and adds median <50 microseconds of policy-engine overhead per turn.

Figures & tables

Appendix figures & tables2 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. ClawMMU: Protection-Coherent Virtual Memory for Stateful LLM Agents

    Oct 20, 2026Jinhao Hu, Bardia Mohammadi, Mofasshara Binte Rafique +4AI Agent SecurityMemory Management for LLM Agents

  2. Semantic-TVM: Structure-Preserving Trustworthy Virtual Memory for Memory-Augmented and Tool-Using Agents

    Sep 14, 2026Yu Li, Qikun Cai, Tao Huang +1Agent MemoryPrivacy-Preserving Language Models

  3. KVMem: Virtualizing Million-Token Agent Workspaces on a Consumer GPU

    Sep 4, 2026Di Chai, Leye Wang, Zeshen Su +2Memory Management for LLM AgentsLLM Context Management