For a long-horizon agent, context management is not simply a matter of retaining more text. The system must keep useful findings accessible, prevent irrelevant history from crowding out current reasoning, and recover details when a summary is not enough. Self-Context addresses this problem with an inference-time framework placed between a language model and its existing harness. The authors say it requires neither model retraining nor replacement of the native tool workflow.
The framework has two main components:
- Working-graph management. The agent records exploration attempts and their outcomes in an editable graph. Instead of only appending messages to a transcript, it can add or remove nodes and change connections. This structure is intended to make it easier to track what has been tried, what was learned, and how findings relate. The graph acts as a task-specific working map, not merely a final summary.
- Interaction-history management. Fold and unfold operations let the agent replace a stretch of interaction with summary notes when context needs to be freed, then restore the original history when specific details need checking. This reversibility is meant to address a weakness of ordinary compaction: once information is discarded, it may be difficult or impossible to recover.
According to the paper abstract, experiments on three agent tasks show improvements in both task performance and interaction efficiency. The project post reports that on Qwen3.8-27B, Self-Context achieved a 69.8% macro average—5.7 percentage points above the Vanilla Harness—while using 23.7% fewer turns. On Terminal-Bench 2.1, it reports 82.0%, a gain of 7.8 points, with 31.8% fewer turns. These are figures presented by the authors. The supplied material does not include the full task-by-task results, evaluation settings, or statistical tests, so the results should not be treated as proof of performance across all models and use cases.
The broader idea is to make context management an action the agent can control, rather than a one-way compression step imposed from outside. A graph can preserve the thread of exploration, while reversible history offers a route back to the underlying interaction record. This combination could be useful in tasks involving repeated tool calls, trial and error, and decisions that depend on earlier evidence. Practical questions remain: how reliably should the graph be updated, how faithful are the summaries, and how much context does unfolding consume? Further comparisons should measure overhead, robustness, and generalization against alternative memory and summarization methods.
Source: Hugging Face Daily Papers
Comments
Checking sign-in status...
Loading comments...