Self-Compacting Language Model Agents
Summary
SelfCompact is a scaffolding approach that lets language models autonomously decide when and how to compact long agent traces, achieving better performance with reduced token costs compared to fixed-interval methods.
View Cached Full Text
Cached at: 06/23/26, 05:40 AM
Paper page - Self-Compacting Language Model Agents
Source: https://huggingface.co/papers/2606.23525
Abstract
SelfCompact is a scaffolding approach that enables models to autonomously determine optimal compaction timing and methods for managing long agent traces, achieving better performance with reduced token costs compared to fixed-interval methods.
Longagent tracescomposed ofchains of thoughtandtool callsaccumulate stale content that anchor subsequent generations, and eventually outgrow thecontext window. Existingscaffoldsmitigate it with fixed-intervalcompactiontriggered at a token threshold. Such triggers pay no heed totrajectory structure, risking discard of partial results mid-derivation or mid-search. We propose SelfCompact, a scaffold that allows the model itself to decide when and how to compact. Specifically, it pairs twoinference-time elements: (i) acompaction toolthe model invokes to summarize the accumulated context, and (ii) a lightweightrubricspecifying when to fire (a sub-task has resolved, or the trajectory is converging) and when to suppress (mid-derivation, or when stuck). Both are needed. The tool alone is unevenly used across open-weight models, often invoked at unhelpful moments or not at all; therubricalone cannot act. Together, they elicit effectiveadaptive compactionwithout any fine-tuning or external supervision. We present empirical results on six benchmarks (competitive math andagentic search) and seven models. Our results show that SelfCompact matches or exceeds fixed-interval summarization at a fraction of thetoken cost, improving over a no-summarization baseline by up to 18.1 points on math and 5-9 points onagentic searchat 30-70% lower per-question cost. Our results expose a meta-cognitive gap: although unprompted models cannot reliably tell when their own context is rotting, a lightweightrubriccloses this gap, reframing when to compact as a capability thatscaffoldscan supply without training.
View arXiv pageView PDFAdd to collection
Models citing this paper0
No model linking this paper
Cite arxiv.org/abs/2606.23525 in a model README.md to link it from this page.
Datasets citing this paper0
No dataset linking this paper
Cite arxiv.org/abs/2606.23525 in a dataset README.md to link it from this page.
Spaces citing this paper0
No Space linking this paper
Cite arxiv.org/abs/2606.23525 in a Space README.md to link it from this page.
Collections including this paper0
No Collection including this paper
Add this paper to acollectionto link it from this page.
Similar Articles
@tli104: New paper: "Self-Compacting Language Model Agents" LM agents build up long traces of reasoning and tool calls. As the t…
New paper proposes self-compacting language model agents that can decide when to clean up their own traces of reasoning and tool calls to avoid accumulating mistakes and stale information.
PACE: Two-Timescale Self-Evolution for Small Language Model Agents
PACE introduces a two-timescale framework for self-evolution of small language model agents, coordinating low-risk prompt refinement with higher-risk control-logic updates, achieving up to +9.2% relative improvement across benchmarks.
Self-GC: Self-Governing Context for Long-Horizon LLM Agents
Self-GC introduces a self-governing context management system for long-horizon LLM agents that treats agent history as indexed objects with fold, mask, and prune actions, reducing token usage while preserving future dependencies.
GenericAgent: A Token-Efficient Self-Evolving LLM Agent via Contextual Information Density Maximization (V1.0)
This paper introduces GenericAgent, a self-evolving LLM agent system designed to maximize context information density. It addresses long-horizon limitations through hierarchical memory, reusable SOPs, and efficient compression, achieving better performance with fewer tokens compared to leading agents.
Parallel Context Compaction for Long-Horizon LLM Agent Serving
Introduces parallel context compaction for long-horizon LLM agents, enabling fine-grained control over summary volume and reducing end-to-end latency compared to sequential synchronous compaction across multiple backbone models.