StateComp: Learning When to Compress History in Long Horizon Agents
On the map: LLM agents and tool use → Agent memory systems
Abstract (arXiv)
Long-horizon agents continuously accumulate interaction history during task execution, yet the importance of past interactions changes as the agent state evolves. Existing context management methods largely compress history based on fixed windows, periodic schedules, or current relevance, overlooking a more fundamental question: when has a past interaction become safe to replace? Premature compression may remove information still needed for future actions, while overly conservative retention leads to substantial context overhead. To address this, we propose State Conditioned Compression (StateComp), a framework that determines when historical interactions can be safely compressed according to the current agent state. StateComp constructs KEEP and READY supervision through a two-stage annotation procedure and trains an imbalance-aware router on hidden representations from a frozen language model. A bounded state representation further reduces the cost of evaluating long histories, while adjacent READY interactions are grouped into continuous spans and replaced with compact summaries during execution. Experiments on WorkBuddyBench show that StateComp reduces total agent and summarization tokens by 52.27% while maintaining task performance, and achieves a 12.67-fold speedup in representation extraction.
Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Placed in Agent memory systems, one of 16 directions in LLM agents and tool use. Builds on 41 of its 49 references that are in the map. First posted on arXiv 23 Sep 2026.
Builds on
41 of 49 references.
Closest ancestors · 11
Same direction, newest first
- 2026ACM: Agentic Context Management for Long Horizon Tasks26 Jul
- 2026Self-GC: Self-Governing Context for Long-Horizon LLM Agents1 Jul
- 2026Self-Compacting Language Model Agents22 Jun
- 2026Learning What Not to Forget: Long-Horizon Agent Memory from a Few Kilobytes of Learning18 Jun
- 2026CoMem: Context Management with A Decoupled Long-Context Model29 May
- 2026SAM: State-Adaptive Memory for Long-Horizon Reasoning Agent23 May
- 2025ACON: Optimizing Context Compression for Long-horizon LLM Agents1 Oct
- 2025Memory OS of AI Agent30 May
- 2025Mem0: Building Production-Ready AI Agents with Scalable Long-Term Memory28 Apr
- 2025A-MEM: Agentic Memory for LLM Agents17 Feb
- 2024Evaluating Very Long-Term Conversational Memory of LLM Agents27 Feb
Other references · 30
- 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,695
- 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,944
- 2023Reflexion: Language Agents with Verbal Reinforcement Learningcited by 4,276
- 2023Generative Agents: Interactive Simulacra of Human Behaviorcited by 3,568
- 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,455
- 2023Voyager: An Open-Ended Embodied Agent with Large Language Modelscited by 2,191
- 2023Efficient Streaming Language Models with Attention Sinkscited by 2,186
- 2023LongBench: A Bilingual, Multitask Benchmark for Long Context Understandingcited by 1,417
- 2023AgentBench: Evaluating LLMs as Agentscited by 1,267
- 2026DeepSeek-V4: Towards Highly Efficient Million-Token Context Intelligencecited by 1,040
- 2024SnapKV: LLM Knows What You are Looking for Before Generationcited by 880
- 2024LongMemEval: Benchmarking Chat Assistants on Long-Term Interactive Memorycited by 707
18 more
- 2026GLM-5: from Vibe Coding to Agentic Engineeringcited by 587
- 2023MemoryBank: Enhancing Large Language Models with Long-Term Memorycited by 556
- 2024Quest: Query-Aware Sparsity for Efficient Long-Context LLM Inferencecited by 501
- 2023LongLLMLingua: Accelerating and Enhancing LLMs in Long Context Scenarios via Prompt Compressioncited by 453
- 2023Scissorhands: Exploiting the Persistence of Importance Hypothesis for LLM KV Cache Compression at Test Timecited by 439
- 2024PyramidKV: Dynamic KV Cache Compression based on Pyramidal Information Funnelingcited by 432
- 2023Learning to Compress Prompts with Gist Tokenscited by 390
- 2024MInference 1.0: Accelerating Pre-filling for Long-Context LLMs via Dynamic Sparse Attentioncited by 383
- 2024LongBench v2: Towards Deeper Understanding and Reasoning on Realistic Long-context Multitaskscited by 379
- 2023Adapting Language Models to Compress Contextscited by 356
- 2024LLMLingua-2: Data Distillation for Efficient and Faithful Task-Agnostic Prompt Compressioncited by 348
- 2023In-context Autoencoder for Context Compression in a Large Language Modelcited by 199
- 2023Compressing Context to Enhance Inference Efficiency of Large Language Modelscited by 189
- 2024xRAG: Extreme Context Compression for Retrieval-augmented Generation with One Tokencited by 125
- 2024Long Context Compression with Activation Beaconcited by 104
- 2026SWE-Pruner: Self-Adaptive Context Pruning for Coding Agentscited by 44
- 2025Sculptor: Empowering LLMs with Cognitive Agency via Active Context Managementcited by 18
- 2026Tencent WorkBuddy Bench: A Multi-Domain Coding-Agent Benchmark with Contamination-Resistant Task Constructioncited by 6
Built on by
Citing papers per year: 2026: 1.
1 paper.
Similar, not cited
Close in wording, no citation either way
- 2026Toward Reliable Context Compression for Long-Horizon Agents: An Empirical Study of Execution Instability
- 2026Memory Control Signals Emerge Before Action in Long Horizon Agents
- 2026When Can Agents Forget Their Reasoning? ICLR for Long-Horizon Agent Context Compression
- 2026Adapting Context Compression for Long-Horizon Agents with Counterfactual Continuations
- 2026FOCUS: Training-Free Decision-Preserving Context Compression for LLM Agents
- 2026Beyond Memory: Harnessing Long-Horizon Agents with Explicit Belief States
- 2026FlowState: Execution State as Memory for Long-Horizon LLM Agents
- 2026Persistent Context Graphs for Efficient Memory Compaction in LLM Agents