StateComp: Learning When to Compress History in Long Horizon Agents

Mingxuan Wang, Hongyue Chen, Yinglong Guo, Fei Luo, Chao Ning +4 more
9/23/2026
cs.AI

No confident code implementation found for this paper.

Abstract

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?

Show full abstract

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.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{wang2026statecomp,
  title  = {StateComp: Learning When to Compress History in Long Horizon Agents},
  author = {Mingxuan Wang and Hongyue Chen and Yinglong Guo and Fei Luo and Chao Ning and Bo Wang and Guorun Yao and Yanbiao Ma and Jungong Han},
  year   = {2026},
  eprint = {2609.27298},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2609.27298v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2609.27298.svg)](https://codeofpaper.com/paper/2609.27298)

Discussion