Self-Context: Graph-Based Context Self-Management for Long-Horizon Agents
Ziheng Wang, Chengyi Yang, Renxu Bao, Zhishang Xiang, Chengsong Huang, Wenhao Li, Junnan Zhu, Delai Qiu and 3 others
Xiamen University · Unisound · Washington University in St. Louis · Nanyang Technological University · Institute of Automation, Chinese Academy of Sciences
Published December 1, 2026 · on the feed December 2, 2026 · ▲ 14 · arXiv 2612.01681
The abstract
Effective 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.
The Brief
1:55A short podcast summary of the paper. Written and voiced by AI.
Transcript
Self-Context. Graph-Based Context Self-Management for Long-Horizon Agents. By Ziheng Wang and ten others, from Xiamen University, Unisound, and three other institutions. Published on the first of December.
For an agent working over a long horizon, context is a finite resource. However large the window, it is still exposed to pollution and to questions of which information is relevant. Existing approaches assume that keeping critical findings somewhere in the interaction history is enough for later decisions. In practice they struggle with two things: noise that builds up in the context, and compaction that cannot be undone. Noise makes the useful findings harder to pick out. Irreversible compaction is worse, because once a detail has been summarised away, a later decision that needs it has nowhere to find it.
Self-Context hands context management to the model itself. It is a graph-based, plug-and-play framework that sits between the LLM and its native harness, and it lets the LLM take over managing its own context through two components. Plug-and-play means it slots into that existing arrangement rather than replacing it.
The first is graph management, for structured exploration. Each exploration attempt and what it found is recorded in a working graph that can be edited. The second is history management, for preserving the critical details of the interaction. It works by folding and unfolding: interaction history is replaced with summary notes, and the original history can be restored when it is needed again. That second operation is what makes compaction reversible.
Extensive experiments on three agent tasks show Self-Context improving both task performance and interaction efficiency. The authors attribute this to critical findings staying available for later decisions, and to exploration remaining coherent. Those two explanations line up with the two components: the history side keeps findings reachable, and the graph side keeps the exploration in order.
In short, the agent becomes the curator of its own memory, keeping a map of what it has tried, and compressing history in a way it can take back.
More with an account
Listen to every day’s papers
Daily playlists, deep dives, quests for the papers, and quizzes on their key terms.
Join free