arXiv(opens in a new tab)cs.AIAug 2026Cited by 3 papers on PaperVantage

Manuscript Offprint

arXiv:2608.31057

Measure Before You Manage: Evaluating Agent Working Memory in Coding Agents

Le Chen, Zishen Wan, Baixi Sun, Xiaolong Ma, Chih-Hsuan Yang, Feng Yan, Sheng Di, Franck Cappello, Rajeev Thakur

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Agent working memory is heterogeneous. Objects such as instructions, artifacts, tool outputs, and agent-generated state play different semantic roles and exhibit different size, retention, and representation profiles. Recent work has begun to explore memory-management mechanisms that account for such heterogeneity. This work focuses on semantic heterogeneity and studies how it should shape the management and evaluation of working memory in coding agents. Across 55 archived coding-agent trajectories, we find that semantically different working-memory objects exhibit distinct retention and compression behavior. This heterogeneity motivates semantically informed memory management. We study two semantically informed strategies: an object-aware compression policy and a retrieval-based policy. Their evaluation shows that calibration gains may not transfer to held-out tasks, and that equal token budgets do not imply equal delivered context or management cost. A real-system replay further exposes serving limits that nominal budgets alone do not capture. Together, these results show why semantic structure matters for agent working memory and why evaluating memory-management strategies requires more than a nominal token budget. We organize these lessons into four levels: stored state, delivered context, management work, and task or process outcome.

1 Introduction

Agent working memory is heterogeneous. During a coding trajectory, instructions, source artifacts, tool outputs, and agent-generated state play different semantic roles and evolve differently over time. Their size, persistence, representation, and lifecycle characteristics need not follow the same pattern. Yet memory-management mechanisms commonly center on retention, compression, eviction, or retrieval rules that may treat this heterogeneous state uniformly. Whether and how semantic heterogeneity should shape the management of agent working memory—and how such management should be evaluated—remains unclear.

We study these questions in coding agents. We first characterize working memory at the level of typed objects, asking how different kinds of state differ in size, retention, representation, and compression behavior. We then examine two semantically informed management strategies: a calibration-informed object-aware compression policy and a retrieval-based policy adapted from prior work. Our goal is not to identify a universally winning policy, but to understand what these strategies reveal about heterogeneous working memory and what evidence is required to evaluate them reliably. Specifically, we ask: (1) how does semantic heterogeneity manifest in coding-agent working memory, and (2) what must be measured before attributing a benefit to a memory-management strategy?

Our contributions are threefold. First, we characterize semantic heterogeneity in coding-agent working memory through typed-object accounting of size, retention, representation, and compression behavior across 55 archived trajectories. Second, we examine two semantically informed management strategies—an object-aware compression policy and a retrieval-based policy—as case studies of how

40th Conference on Neural Information Processing Systems (NeurIPS 2026). Workshop: AgenticOS: Co-designing Systems and ML Foundations of an OS Layer for Agentic AI.

heterogeneous working memory is managed in practice. Their results illustrate how apparent gains may not transfer to held-out tasks and how nominally equal budgets can still leave delivered context and management work unequal. Third, we synthesize these observations into a four-level evaluation framework that separates stored state, delivered context, management work, and task or process outcome.

Relation to existing work. Memory hierarchies and retrieval are established agent design ideas. MemGPT manages movement between memory tiers for document analysis and multi-session conversation [Packer et al., 2023]; Generative Agents combines memory retrieval with reflection and planning in a social simulation [Park et al., 2023]; and SWE-agent shows that the agent-computer interface affects software-engineering behavior and performance [Yang et al., 2024]. These works motivate mechanisms relevant to our setting, but are not the systems evaluated here.

Prior work has also studied the evaluation and cost of agent memory. Lindenbauer et al. [2025] compare observation masking and LLM summarization on SWE-bench Verified; Chintalapati et al. [2026] compare memory condensers on scientific-discovery tasks, reporting quality and token costs; and Omri et al. [2026] characterize construction, retrieval, and generation costs across agent-memory systems. We do not claim novelty in memory hierarchies, retrieval, summarization, or agent-memory profiling itself. Our focus is narrower: task-local working memory in coding agents and how its semantic heterogeneity should be measured, managed, and evaluated. We combine typed-object residency accounting with explicit controls for calibration, delivered context, management work, and outcome interpretation within a single coding-agent archive. The empirical scope and outcome validation remain deliberately limited.

References (2)

  • This answer is limited to the study described in the manuscript, not a certification of unrelated historical activities
  • Answer: [Yes] Justification: Sections 2, 4, and 5 and Appendices A, C, D, and E describe the coding-agent LLM, summary generation, and importance scoring, including the recorded model alias and auxiliary-call accounting