titleSelf-Context: Graph-Based Context Self-Management for Long-Horizon Agents
authorsZiheng Wang, Chengyi Yang, Renxu Bao, Zhishang Xiang, Chengsong Huang, Wenhao Li, Junnan Zhu, Delai Qiu, Yining Wang, Shengping Liu, Jinsong Su
date2026-12-01
venuearXiv (preprint, not peer reviewed)
idarXiv:2612.01681
upvotes31 (Hugging Face Daily Papers, 2026-12-04)
linksabs pdf hf code
cite
abstractEffective context management is essential for long-horizon agents because context is a finite resource, and context windows of any size remain subject to context pollution and information relevance concerns. However, existing approaches assume that keeping critical findings in the interaction history is sufficient for later decisions and struggle with accumulating context noise and irreversible context compaction. To address these challenges, we propose Self-Context, a graph-based plug-and-play framework between the LLM and its native harness. It allows the LLM to take over context management through two components: graph management for structured exploration and history management for preserving critical interaction details. Graph management records exploration attempts and their findings in an editable working graph. History management uses fold and unfold to replace interaction history with summary notes and restore the original history when needed. Extensive experiments on three agent tasks show that Self-Context improves both task performance and interaction efficiency by keeping critical findings available for later decisions and maintaining exploration coherence.

bibtex

@misc{wang2026self,
  title={Self-Context: Graph-Based Context Self-Management for Long-Horizon Agents},
  author={Ziheng Wang and Chengyi Yang and Renxu Bao and Zhishang Xiang and Chengsong Huang and Wenhao Li and Junnan Zhu and Delai Qiu and Yining Wang and Shengping Liu and Jinsong Su},
  year={2026},
  eprint={2612.01681},
  archivePrefix={arXiv},
  url={https://arxiv.org/abs/2612.01681}
}