NeurIPS 2026QuestionsPapersAreasAboutMarkdown

Self-Compacting Language Model Agents

Tianjian Li, Jingyu, Xi Wang, William Jurayj, Chuanyang Jin, Mehrdad Farajtabar, Eric Nalisnick, Daniel Khashabi

NeurIPS page · Open on the map

Category: LLM Reasoning, Memory & RAG › Test-Time Scaling and Optimization · Type: new method · Keywords: context rot, adaptive compaction, language model agents, inference-time tools, reasoning trajectories

Areas: LLM Reasoning › Agentic Reasoning › Efficient Agent Reasoning; Long Context › Long-context mechanisms › Long-context reasoning; AI Agents › Agent Systems and Interactions › Efficient Agent Inference

Summary

SelfCompact introduces an inference-time compaction tool and rubric that adaptively decide when to summarize long-form reasoning traces, improving performance on math and agentic search without fine-tuning.

Explained to a 5-year-old

When a computer thinks and talks a lot, it can start mixing up old and new information. The paper gives the computer a tool that can cut its long talks into shorter pieces. It also gives the computer a simple rule that says when it is safe to cut (like after finishing a small task) and when not to cut (like while still working on a problem). Using both the tool and the rule helps the computer remember better and solve problems faster. This works without having to retrain the computer, and it makes the computer do better on math problems and searching.

Explained to a 5-year-old, longer

When a computer does a long chain of thinking, it can start to get confused because old information mixes with new information. This mixing up is called context rot, and it makes the computer's answers less accurate. Existing methods just cut the conversation after a certain number of words, which can cut away important parts. The paper introduces a smarter way to cut the conversation that looks at how the thinking is going. It gives the computer a tool that can decide to cut the conversation itself. It also gives the computer a simple rule that says when it is a good time to cut (like after finishing a small step) and when it is not a good time (like while still working on a problem). The tool alone sometimes cuts at the wrong moments, and the rule alone cannot actually cut anything. When both are used together, they can cut the conversation at just the right times, keeping the important parts and removing the stale ones. This helps the computer keep its reasoning clear and avoid mistakes. It also makes the computer faster because it doesn't have to remember as much useless information. The new method works without changing how the computer was trained, so it can be used right away. It shows big improvements on math problems and on searching tasks, making the computer more reliable and efficient.

For a technical reader

The paper addresses context rot in long-form language model reasoning by introducing an inline compaction tool and a lightweight rubric that jointly decide when to summarize. The tool can be invoked by the model, while the rubric defines firing and suppression conditions based on sub-task resolution and trajectory convergence. Together they provide adaptive, inference-time compaction without any fine-tuning, achieving performance comparable to fixed-interval summarization at a fraction of the token cost and improving baseline results on math and agentic search benchmarks.

Problem

Long-form reasoning and tool-calling traces accumulate errors and stale content, causing a degradation of subsequent generations known as context rot. Existing fixed-interval compaction strategies trigger summarization at arbitrary token thresholds, risking loss of partial derivations or search progress.

Method

The approach pairs an inline compaction tool that the model can invoke with a lightweight rubric that decides when to apply compaction (e.g., after a sub-task resolves or the trajectory converges) and when to suppress it (e.g., mid-derivation or when stuck). Together they enable adaptive, inference-time compaction without any fine-tuning.

Results

The approach matches or exceeds fixed-interval summarization at a fraction of the token cost, improving over a no-summarization baseline by up to 16.7 points on math and 5-9 points on agentic search while reducing per-question cost by 30-70%.

Contributions

It introduces an inference-time compaction tool and rubric that jointly enable adaptive summarization of reasoning traces, and demonstrates substantial gains on math and agentic search benchmarks without requiring fine-tuning.

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction