AttnCompress: Dynamic Attention-Guided Trajectory Compression for Software Engineering Agents
On the map: LLM agents and tool use → Software engineering coding agents
Abstract (arXiv)
The transition from human-centric assistance to Autonomous Software Engineering (ASE) agents has enabled the resolution of complex real-world SE tasks. However, the trial-and-error nature of these agents generates lengthy interaction trajectories, creating severe bottlenecks in terms of context window limits and cost. While context compression offers a potential remedy, prior approaches suffer from static pruning strategies and granularity mismatches, often failing to preserve the semantic dependencies and syntactic details crucial for SE tasks. To strictly preserve critical task evidence while reducing context length, we introduce AttnCompress, a dynamic attention-guided trajectory compression framework. Unlike existing approaches, AttnCompress bridges the gap between semantic integrity and dynamic adaptability through three key mechanisms: (1) structure-aware segmentation via perplexity (PPL) spikes to preserve the syntactic structure of code and logs; (2) relevance estimation using proxy attention weights to quantify the precise relevance of historical blocks to the agent's current reasoning; and (3) a dynamic rolling window to re-evaluate and recall historical context as the task evolves. Extensive evaluation on SWE-Bench-Verified and Multi-SWE-Bench demonstrates that AttnCompress achieves a pass rate of 53.17%, outperforming prior state-of-the-art baselines while reducing token consumption by 21.6% and total costs by 33.6%. The framework proves to be model-agnostic and generalizes effectively across diverse programming languages.
Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use. Builds on 17 of its 42 references that are in the map. First posted on arXiv 8 Sep 2026.
Builds on
17 of 42 references.
Closest ancestors · 2
Same direction, newest first
- 2025From Code Foundation Models to Agents and Applications: A Comprehensive Survey and Practical Guide to Code Intelligence23 Nov
- 2025Trae Agent: An LLM-based Agent for Software Engineering with Test-time Scaling31 Jul
Other references · 15
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
- 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,695
- 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,944
- 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,455
- 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,373
- 2024RULER: What's the Real Context Size of Your Long-Context Language Models?cited by 1,346
- 2024LLMLingua-2: Data Distillation for Efficient and Faithful Task-Agnostic Prompt Compressioncited by 348
- 2024SWE-bench Multimodal: Do AI Systems Generalize to Visual Software Domains?cited by 203
- 2025Multi-SWE-bench: A Multilingual Benchmark for Issue Resolvingcited by 171
- 2025ACON: Optimizing Context Compression for Long-horizon LLM Agentscited by 136
- 2024Prompt Compression with Context-Aware Sentence Encoding for Fast and Improved LLM Inferencecited by 53
- 2025The Complexity Trap: Simple Observation Masking Is as Efficient as LLM Summarization for Agent Context Managementcited by 48
Built on by
Citing papers per year: 2026: 1.
1 paper.
Similar, not cited
Close in wording, no citation either way
- 2025Context as a Tool: Context Management for Long-Horizon SWE-Agents
- 2025Prometheus: Towards Long-Horizon Codebase Navigation for Repository-Level Problem Solving
- 2026On Problems of Implicit Context Compression for Software Engineering Agents
- 2026SWE Context Bench: A Benchmark for Context Learning in Coding
- 2026A Self-Evolving Framework for Efficient Terminal Agents via Observational Context Compression
- 2026Compress What You See, Not What You Say: Anchored Context Distillation for Latent-Observation Software Engineering Agents
- 2026Structurally Aligned Subtask-Level Memory for Software Engineering Agents
- 2026AutoCompact: Learning When to Compact Context in Long-Horizon Coding Agents