Models can manage their own context now. They still need to be told when.

21%of questions right when the harness decides what the model forgets

56%when the model decides for itself (GPT-6.1 Sol, 32K window)

A model can only read a fixed amount of text at once. That limit is its context window. Every long agent run hits it: the history of commands, files and results grows past the window, and something has to be thrown away. Today the harness does that. Claude Code and Codex both watch the token count, and near the limit they replace the older history with a summary.

The model has no say in it. It may be halfway through a table it still needs when the harness cuts.

On November 25 a team working on NOOA, NVIDIA’s open-source agent harness, published a paper that tests the other arrangement: give the model a tool, and let it decide when to compact and what to keep. The paper is called “Letting Models Manage Their Own Context: Where We Stand”. I read it because I run agents all day, and every long run of mine ends up compacted.

What they compared

The baseline is the usual design. At 80% of the context budget the harness summarizes the earlier history. It keeps the initial instructions and the 10 most recent events.

In the other setup the harness never compacts on a fixed trigger. The model gets three things: a call that collapses a range of events into a summary it writes itself, a live reading of how full its context is, and one instruction to consider compacting only once usage reaches 85%.

The call looks like this:

tag = self.events.collapse("3", "17", summary_text="Explored the repo.")
original = self.events["9"]

The first line replaces events 3 to 17 with a summary. The second reads one of the originals back. Collapsed events are archived, not deleted.

They ran four models, GPT-6.1 Sol, Kimi K3, DeepSeek V4 Pro and Claude Opus 5.5, with budgets from 8K to 512K tokens, on two benchmarks: OfficeQA Pro v2, 90 questions over U.S. federal spending documents, and MLE-bench Lite, 22 Kaggle competitions.

What they found

Correct answers in a 32K window
  • Harness compacts
  • Model compacts
21%
56%

GPT-6.1 Sol

41%
43%

Kimi K3

OfficeQA Pro v2, 90 questions. Source: the paper, arXiv 2611.34147.

GPT-6.1 Sol nearly tripled its score. Kimi K3 scored about the same, 43% against 41%, but used 41% fewer input tokens across the run: 36 million against 62 million.

Three limits come with those numbers, and the authors state all of them.

The gains sit at tight budgets and shrink as the budget grows. On MLE-bench Lite the effect is much smaller and shows only at the tightest budgets.

The models did not all use the tool. GPT, Kimi and DeepSeek called it in 42 to 53% of tasks. Opus called it in 4%, and it trailed at small budgets.

The benchmarks are small. With 90 questions, Kimi’s two-point gain is about two questions.

41% fewer tokens is not a 41% smaller bill

The paper says what its token number counts: every input token at every turn, cached or not.

That matters because cached tokens are cheap. In an experiment I published last month I cut 28% of my coding agent’s input tokens, and the estimated cost fell about 4%. Of the 129,831 tokens I removed, 122,496 were already being served from cache, at a twentieth of the normal price.

Compaction has a second cost. A provider’s cache matches a prompt from the start up to the first place it changed. Collapsing events 3 to 17 changes the prompt at event 3, so everything after that point is computed again on the next request. A run that compacts often sends fewer tokens and can pay full price for more of them.

The authors saw this too. They built a prototype for Qwen3.6-27B on the SGLang serving engine that reuses the cache for the part of the prompt after the change. It cut prefill compute by 4 to 15% per request. They are plain that they measured prefill compute, not latency or cost, on one model and one engine, and that the reuse is an approximation.

So the paper does not tell me what model-managed compaction does to a bill. To know, I would need uncached input, cached input and output counted separately, which is what my cost calculator takes.

One sentence does a lot of the work

This is the result I would not have guessed.

The authors removed the instruction about waiting until 85% and ran everything again. They measured how full the context was when the model first compacted.

How full the window was at the first compaction
  • Told to wait until 85%
  • Not told
84%
29%

Kimi K3128K budget

83%
40%

DeepSeek V4 Pro256K budget

rarely compacted
16%

Claude Opus 5.5128K budget

Median share of the budget in use. With the instruction, Opus almost never compacted. Source: the paper, arXiv 2611.34147.

Left alone, Kimi threw history away with 71% of its space still free. The paper calls this context anxiety. At budgets of 128K and above, Kimi and DeepSeek without the instruction scored about 8 points below the plain harness baseline. GPT was less sensitive.

So “the model manages its own context” needs a footnote. The model picks what to collapse. When to start is still set by a sentence the harness author wrote, and for two of the four models that sentence was the difference between beating the baseline and losing to it.

What I would build from this

Keep the event log and the model’s view of it as two things. The paper’s design works because collapsing is a change to the view. The originals stay in the log. That also makes compaction something you can audit and undo, which a summary that overwrites history is not.

Give the model a way back. Archived content was retrieved again after 19% of GPT’s compactions, 7% of Kimi’s and 3% of DeepSeek’s. GPT compressed the hardest, 3.7 times at the median, and went back for the originals about one time in five.

Keep the harness trigger as a fallback. Opus used the tool in 4% of tasks. A harness that hands over compaction and removes its own will fail on a model that does not pick the tool up. In the paper, a request over the budget had its oldest events dropped and was retried. I would keep that floor.

Test the timing instruction for each model. The 85% line is a setting, and it behaved differently on every model. Changing models means running that test again.

Keep hard constraints outside the history. If a rule must survive the whole run, such as “do not touch the production database”, it should not live in events a model is allowed to summarize. The paper’s baseline always keeps the initial instructions. I would put my own rules there and keep them out of reach of the collapse call.

Judge the whole task. Tokens saved per turn tell you little. Count whether the task was done, and what it cost with cached and uncached input counted apart.

Where this leaves me

For a model that takes to the tool, working in a small window, this beat a fixed trigger by a wide margin. For large windows, and for models that ignore the tool, the usual design did as well or better.

The model can decide what is worth keeping. The harness still has to hold the log, set the limit, and tell the model when to start.

Sources