mlsanityData to 7 Oct 2026

Compress What You See, Not What You Say: Anchored Context Distillation for Latent-Observation Software Engineering Agents

arXiv 2609.31430 ↗First posted 25 Sep 2026cs.AIcited by 0

On the map: LLM agents and tool use → Software engineering coding agents also fits: Agent memory systems

Abstract (arXiv)

Tool observations dominate the context of software-engineering agents, making long interaction histories costly to maintain. Existing context compression methods can discard information needed by later actions, while adapting agents to soft-token representations can compromise their original behavior. To reduce context while preserving action-critical information and agent behavior, we combine Latent Observations, Hard Actions (LOHA), a context layout that separates compressed history from text needed for exact reference, with Anchored Context Distillation (ACD), a training method that enables latent reading while constraining behavioral drift. LOHA compresses older tool observations into soft tokens while retaining the agent's own turns and the last K observations in text, providing compact access to historical information and exact access to recent content. To enable the agent to use this representation, ACD distills the base model's full-text predictions into the latent view while anchoring its behavior on plain-text inputs to the same base model. On SWE-bench Verified, K=3 reduces context per call by 43% for Qwen3-4B and 57% for SWE-Master-4B-RL, with resolve rates of 12.1% and 21.8% versus 14.5% and 27.5% for their uncompressed bases. A single-run recency sweep reaches 14.4% and 23.0% at K=8, with larger windows generally favoring task performance over compression. Under a 32K-token limit, Qwen3 with K=3 resolves 21.1% of a 199-instance subset versus 11.1% for the same adapted agent using full text. In concurrent single-GPU serving, it achieves 1.9 times that full-text agent's instance throughput.

Key facts. No citing papers in the map yet (data through 7 Oct 2026). Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use. Builds on 40 of its 44 references that are in the map. First posted on arXiv 25 Sep 2026.

Builds on

40 of 44 references.

Closest ancestors · 6

Same direction, newest first

  1. 2026SWE-Pruner Pro: The Coder LLM Already Knows What to Prune20 Jul
  2. 2026CoACT: Action-Preserving Observation Compression for Coding Agents3 Jul
  3. 2026SWE-Pruner: Self-Adaptive Context Pruning for Coding Agents23 Jan
  4. 2025SWE-smith: Scaling Data for Software Engineering Agents30 Apr
  5. 2024OpenHands: An Open Platform for AI Software Developers as Generalist Agents23 Jul
  6. 2024SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering6 May

Other references · 34

  1. 2022Training language models to follow instructions with human feedbackcited by 15,712
  2. 2015Distilling the Knowledge in a Neural Networkcited by 10,076
  3. 2016Overcoming catastrophic forgetting in neural networkscited by 4,718
  4. 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,193
  5. 2016Learning without Forgettingcited by 2,465
  6. 2019Fine-Tuning Language Models from Human Preferencescited by 2,124
  7. 2023MemGPT: Towards LLMs as Operating Systemscited by 1,295
  8. 2021A General Language Assistant as a Laboratory for Alignmentcited by 1,023
  9. 2023On-Policy Distillation of Language Models: Learning from Self-Generated Mistakescited by 840
  10. 2016Sequence-Level Knowledge Distillationcited by 761
  11. 2019Improved Knowledge Distillation via Teacher Assistantcited by 567
  12. 2018Born Again Neural Networkscited by 539
22 more
  1. 2023Learning to Compress Prompts with Gist Tokenscited by 379
  2. 2024LLMLingua-2: Data Distillation for Efficient and Faithful Task-Agnostic Prompt Compressioncited by 343
  3. 2023LLMLingua: Compressing Prompts for Accelerated Inference of Large Language Modelscited by 279
  4. 2024AutoCodeRover: Autonomous Program Improvementcited by 272
  5. 2023In-context Autoencoder for Context Compression in a Large Language Modelcited by 190
  6. 2023Compressing Context to Enhance Inference Efficiency of Large Language Modelscited by 185
  7. 2025Scaling Long-Horizon LLM Agent via Context-Foldingcited by 136
  8. 2022Learning by Distilling Contextcited by 128
  9. 2025ACON: Optimizing Context Compression for Long-horizon LLM Agentscited by 126
  10. 2024xRAG: Extreme Context Compression for Retrieval-augmented Generation with One Tokencited by 123
  11. 2025MemGen: Weaving Generative Latent Memory for Self-Evolving Agentscited by 99
  12. 2025AgentFold: Long-Horizon Web Agents with Proactive Context Managementcited by 95
  13. 2024Self-Distillation Bridges Distribution Gap in Language Model Fine-Tuningcited by 90
  14. 2024500xCompressor: Generalized Prompt Compression for Large Language Modelscited by 45
  15. 2025The Complexity Trap: Simple Observation Masking Is as Efficient as LLM Summarization for Agent Context Managementcited by 40
  16. 2025LongCodeZip: Compress Long Context for Code Language Modelscited by 38
  17. 2026LatentMem: Customizing Latent Memory for Multi-Agent Systemscited by 12
  18. 2026A Self-Evolving Framework for Efficient Terminal Agents via Observational Context Compressioncited by 12
  19. 2024Natural Is The Best: Model-Agnostic Code Simplification for Pre-trained Large Language Modelscited by 10
  20. 2026ContextWeaver: Selective and Dependency-Structured Memory Construction for LLM Agentscited by 4
  21. 2026End-to-End Context Compression at Scalecited by 4
  22. 2026Mem-W: Latent Memory-Native GUI Agentscited by 3

Built on by

Not cited yet.

Similar, not cited

Close in wording, no citation either way

  1. 2026On Problems of Implicit Context Compression for Software Engineering Agents
  2. 2026StateComp: Learning When to Compress History in Long Horizon Agents
  3. 2026AttnCompress: Dynamic Attention-Guided Trajectory Compression for Software Engineering Agents
  4. 2025Context as a Tool: Context Management for Long-Horizon SWE-Agents
  5. 2026SoftSkill: Behavioral Compression for Contextual Adaptation
  6. 2026FOCUS: Training-Free Decision-Preserving Context Compression for LLM Agents
  7. 2026Beyond Token Savings: A Systematic Study of Context Compression in LLM Agents
  8. 2026LLM Agents Are Latent Context Managers: Eliciting Self-Managed Context via State Proprioception