mlsanityData to 14 Oct 2026

The Complexity Trap: Simple Observation Masking Is as Efficient as LLM Summarization for Agent Context Management

arXiv 2508.21433 ↗First posted 29 Aug 2025cs.SE cs.AIcited by 48

On the map: LLM agents and tool use → General LLM agent frameworks and benchmarks

Abstract (arXiv)

Large Language Model (LLM)-based agents solve complex tasks through iterative reasoning, exploration, and tool-use, a process that can result in long, expensive context histories. While state-of-the-art Software Engineering (SE) agents like OpenHands or Cursor use LLM-based summarization to tackle this issue, it is unclear whether the increased complexity offers tangible performance benefits compared to simply omitting older observations. We present a systematic comparison of these approaches within SWE-agent on SWE-bench Verified across five diverse model configurations. Moreover, we show initial evidence of our findings generalizing to the OpenHands agent scaffold. We find that a simple environment observation masking strategy halves cost relative to the raw agent while matching, and sometimes slightly exceeding, the solve rate of LLM summarization. Additionally, we introduce a novel hybrid approach that further reduces costs by 7% and 11% compared to just observation masking or LLM summarization, respectively. Our findings raise concerns regarding the trend towards pure LLM summarization and provide initial evidence of untapped cost reductions by pushing the efficiency-effectiveness frontier. We release code and data for reproducibility.

Key facts. Cited by 48 papers in the map (data through 14 Oct 2026). Placed in General LLM agent frameworks and benchmarks, one of 16 directions in LLM agents and tool use. Builds on 26 of its 41 references that are in the map. First posted on arXiv 29 Aug 2025.

Builds on

26 of 41 references.

References · 26

  1. 2017Attention Is All You Needcited by 60,361
  2. 2020Language Models are Few-Shot Learnerscited by 32,419
  3. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
  4. 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,695
  5. 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,944
  6. 2023Reflexion: Language Agents with Verbal Reinforcement Learningcited by 4,276
  7. 2018HotpotQA: A Dataset for Diverse, Explainable Multi-hop Question Answeringcited by 3,754
  8. 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,455
  9. 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,373
  10. 2024SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineeringcited by 1,737
  11. 2025Search-R1: Training LLMs to Reason and Leverage Search Engines with Reinforcement Learningcited by 1,444
  12. 2022WebShop: Towards Scalable Real-World Web Interaction with Grounded Language Agentscited by 1,251
14 more
  1. 2024Qwen2.5-Coder Technical Reportcited by 1,203
  2. 2024OpenHands: An Open Platform for AI Software Developers as Generalist Agentscited by 1,002
  3. 2023YaRN: Efficient Context Window Extension of Large Language Modelscited by 601
  4. 2024Executable Code Actions Elicit Better LLM Agentscited by 564
  5. 2024Agentless: Demystifying LLM-based Software Engineering Agentscited by 421
  6. 2024Training Software Engineering Agents and Verifiers with SWE-Gymcited by 336
  7. 2025SWE-smith: Scaling Data for Software Engineering Agentscited by 285
  8. 2025R2E-Gym: Procedural Environments and Hybrid Verifiers for Scaling Open-Weights SWE Agentscited by 158
  9. 2025Can 1B LLM Surpass 405B LLM? Rethinking Compute-Optimal Test-Time Scalingcited by 136
  10. 2024SWE-Search: Enhancing Software Agents with Monte Carlo Tree Search and Iterative Refinementcited by 132
  11. 2025NoLiMa: Long-Context Evaluation Beyond Literal Matchingcited by 126
  12. 2024Diversity Empowers Intelligence: Integrating Expertise of Software Engineering Agentscited by 36
  13. 2025DARS: Dynamic Action Re-Sampling to Enhance Coding Agent Performance by Adaptive Tree Traversalcited by 20
  14. 2025From Knowledge to Noise: CTIM-Rover and the Pitfalls of Episodic Memory in Software Engineering Agentscited by 4

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 1; 2026: 47.

48 papers.

Sort:

By area:

  1. 2025Reducing Cost of LLM Agents with Trajectory Reductioncited by 48
  2. 2026SWE-Pruner: Self-Adaptive Context Pruning for Coding Agentscited by 44
  3. 2026Scaling Test-Time Compute for Agentic Codingcited by 15
  4. 2026Beyond Compaction: Structured Context Eviction for Long-Horizon Agentscited by 8
  5. 2026Agent-Omit: Adaptive Context Omission for Efficient LLM Agentscited by 5
  6. 2026Do LLMs Benefit From Their Own Words?cited by 5
  7. 2026ContextEcho: A Benchmark for Persona Drift in Long Agentic-Coding Sessionscited by 5
  8. 2026Masking Stale Observations Helps Search Agents -- Until It Doesn't: A Regime Map and Its Mechanismcited by 5
  9. 2026MatClaw: An Autonomous Code-First LLM Agent for End-to-End Materials Explorationcited by 4
  10. 2026REAgent: Requirement-Driven LLM Agents for Software Issue Resolutioncited by 4
  11. 2026ContextWeaver: Selective and Dependency-Structured Memory Construction for LLM Agentscited by 4
  12. 2026CoACT: Action-Preserving Observation Compression for Coding Agentscited by 4
36 more
  1. 2026Turning Interaction History into Execution State: A Runtime Layer for Long-Horizon Coding Agentscited by 4
  2. 2026View-oriented Conversation Compiler for Agent Trace Analysiscited by 2
  3. 2026Context Pruning for Coding Agents via Multi-Rubric Latent Reasoningcited by 2
  4. 2026AGORA: Adapter-Grounded Observation-Action Retention for Inference-Free Prompt Compression in LLM Agentscited by 2
  5. 2026SWE-Pruner Pro: The Coder LLM Already Knows What to Prunecited by 2
  6. 2026CORVUS: Context Optimization and Reduction Via Underlying Synchronization for LLM Coding Agentscited by 2
  7. 2026Context Cartography: Toward Structured Governance of Contextual Space in Large Language Model Systemscited by 1
  8. 2026RTPO: Reverse-Turn Policy Optimization for Stabilizing Agentic RL Trainingcited by 1
  9. 2026Measure Before You Manage: Evaluating Agent Working Memory in Coding Agentscited by 1
  10. 2026AttnCompress: Dynamic Attention-Guided Trajectory Compression for Software Engineering Agentscited by 1
  11. 2026Reducing Token Usage of State-in-Context Agents using Minificationcited by 0
  12. 2026Omni-Decision: Evidence-Ledger Planning for Omni-Modal Agentscited by 0
  13. 2026CodeNib: A Multi-View Data System for Serving Repository Context to Coding Agentscited by 0
  14. 2026What Does Context Compression Cost an Agent? Interaction Costs Unrevealed by Task-Completion Metricscited by 0
  15. 2026Read Less, Solve More: Token-Efficient Sparse Reading for AI Agentscited by 0
  16. 2026openJiuwen: Beyond Static Harnesses for Long-Horizon Coding Agentscited by 0
  17. 2026Parsing the Stream: A Live Trace Model for Long-Horizon Agents and Their Observerscited by 0
  18. 2026Correct Now, Insufficient Later: Auditing Update Sufficiency in Context Compressioncited by 0
  19. 2026Trajectory-Aware Benchmark Subset Selection for Cost-Efficient Software Engineering Agent Regression Testingcited by 0
  20. 2026Evaluating Budgeted Context Projection with Unexecuted Companion Runscited by 0
  21. 2026Compress What You See, Not What You Say: Anchored Context Distillation for Latent-Observation Software Engineering Agentscited by 0
  22. 2026LAM: Efficient Lossy Agent Memory Framework With A Retrieval-Score Error Boundcited by 0
  23. 2026Beyond Token Savings: A Systematic Study of Context Compression in LLM Agentscited by 0
  24. 2026After the Fix: Transfer of Corrected Agent Experiencecited by 0
  25. 2026StateTape: Action-Conditioned Evidence Lifecycle Modeling for Long-Horizon Coding Agentscited by 0
  26. 2026CADOC: Cache-Aware Dynamic Object Context for Long-Horizon Agentscited by 0
  27. 2026ContextRender: From Execution Dependencies to Agent Contextcited by 0
  28. 2026Persistent Context Graphs for Efficient Memory Compaction in LLM Agentscited by 0
  29. 2026Trained Agentic Context Managementcited by 0
  30. 2026SHarP: Saliency-based Pruning of Agent Harnessescited by 0
  31. 2026MemTrace: State-Consistent Memory for Long-Horizon Coding Agentscited by 0
  32. 2026Does an Agent's History Tell You When Compaction Will Hurt? A Modest, Bounded Effect on the TRACE Paired-Replay Corpuscited by 0
  33. 2026HarnessNet: Feedback-driven Hierarchical Joint Harness Evolution for Multi-agent Systemscited by 0
  34. 2026State Representation Shapes Long-Horizon Agent Learning and Transfer: An Empirical Studycited by 0
  35. 2026StateHarness: Maintaining Evolving Project State for Long-Horizon Coding Agentscited by 0
  36. 2026Maximising Transparency in Context Compaction Improves Retention of Facts and Commitments for Lightweight Coding Agentscited by 0

Similar, not cited

Close in wording, no citation either way

  1. 2026Prune the Summary, Not the History: Source-Judged Compaction for Long-Horizon Agents
  2. 2026FROAV: A Framework for RAG Observation and Agent Verification -- Lowering the Barrier to LLM Agent Research
  3. 2026UniACE: A Unified Framework for Evaluating LLM Agentic Capabilities
  4. 2026Automated Summarization of Software Documents: An LLM-based Multi-Agent Approach
  5. 2026Parallel Context Compaction for Long-Horizon LLM Agent Serving
  6. 2025LMR-BENCH: Evaluating LLM Agent's Ability on Reproducing Language Modeling Research
  7. 2023Enhancing Open-Domain Task-Solving Capability of LLMs via Autonomous Tool Integration from GitHub
  8. 2024AgentQuest: A Modular Benchmark Framework to Measure Progress and Improve LLM Agents