PAPER DEEP DIVE
Letting Models Manage Their Own Context: Where We Stand
The authors let models decide when and what history to compact through NOOA's context API, then compare model-driven and harness-driven management from 8K to 512K tokens on document research and machine learning engineering. Effective use improves accuracy and can reduce input tokens, while suffix KV-cache reuse lowers prefill compute by 4-15% without measurable accuracy loss.
Paper information
Paper: “Letting Models Manage Their Own Context: Where We Stand.”
Authors: Alessio Devoto, Avinash Vem, Tara Safavi, Sanjay Kariyappa, Yu-Hsuan Tseng, Paul Furgale, and Ricardo Silveira Cabral.
Source: arXiv:2611.34147, November 25, 2026.
Code: Publicly available in NVIDIA-NeMo/labs-OO-Agents. This analysis checks commit d4daffb, which contains the event-collapse and archived-event access path.
One-sentence summary: The paper moves control over when and what to compact from the outer harness to the model, then shows that this control helps only when the model can use it, the prompt exposes the right state, and the serving stack can make edits cheaper.
Why this problem matters
Most agent harnesses separate problem solving from context administration. The model chooses tools and produces an answer, while the harness watches token usage and summarizes history near a threshold. A common policy preserves the initial instructions and the latest few events. It is deterministic, easy to audit, and works reasonably well when every task has the same context dynamics.
Agent workloads violate that assumption. A document agent may spend several turns searching before a tool returns a large body of evidence that must remain available for follow-up questions. A coding agent may alternate between failed executions, patches, test logs, and conclusions that are no longer relevant. A fixed trigger knows that the window is filling, but it does not know which evidence has become disposable or which old instruction constrains the next action.
The paper studies a model-driven alternative. The model receives a context API and can collapse a selected range of events into a summary or truncation marker. It can therefore connect context maintenance to its current plan instead of waiting for an external threshold. NVIDIA's open-source NOOA harness supplies the event substrate used in the experiments.
The research question has three parts. Can a model recognize when context work is useful? Can it select a range without destroying evidence that later turns need? Can the serving system reuse enough computation after the edit to make the choice efficient? The paper contributes a joint examination of these questions rather than treating the API call as an isolated capability.
The experiments use OfficeQA Pro v2 and MLE-bench Lite. OfficeQA contains 90 questions over U.S. federal receipts and expenditures; document search and reading make it a natural pressure test for evidence retention. MLE-bench Lite contains 22 Kaggle competitions that require dataset inspection, code, execution feedback, and iteration. The authors sweep context budgets from 8K to 512K to simulate different levels of task pressure.
Analytical notation
The paper does not present a conventional sequence of numbered equations. To make the experimental logic explicit, this article uses derived formalizations. They describe relationships defined in the prose and tables; they are not presented as numbered claims from the paper.
Let $C$ be the effective task content in tokens and $B$ the hard context budget. Context pressure can be written as:
$$P(B)=\frac{C}{B}$$This is more informative than raw occupancy. Two requests may both use 32K tokens while one is carrying necessary evidence and the other has repeatedly copied obsolete tool output. A smaller budget raises the pressure on the second request differently from a task whose information density is genuinely high.
Let $B_t$ denote context use at turn $t$. With a timing instruction $\phi$, the first eligible compaction point is:
$$T_{\phi}=\min\{t\mid P(B_t)\geq \phi\}$$The model-driven condition uses $\phi=0.85$. The harness-driven comparison triggers at 80% and preserves the initial instructions plus the ten most recent events. Their difference is not merely five percentage points; one policy is fixed, while the other is conditioned on the model's representation of the task.
Given cumulative input $I_H$ for the harness and $I_M$ for the model, token savings are:
$$S_{\mathrm{in}}=\frac{I_H-I_M}{I_H}$$For a single compaction, let $C_{\mathrm{before}}$ be the input size at the compaction request and $C_{\mathrm{after}}$ the size of the following request. The compression factor is:
$$R=\frac{C_{\mathrm{before}}}{C_{\mathrm{after}}}$$A value above one means the request became smaller. A value below one means the generated summary plus new tool output made it larger. This definition is important because a successful API call is not automatically a useful compression event.
How model-driven context management works
NOOA stores agent history as ordered, tagged events. An event may be a user message, an assistant action, a tool call, or a tool result. A summary is also represented as an event, but its tag identifies the range it replaces. The model sees the active tags, chooses a continuous interval, and invokes collapse.
Collapse changes the active view. The selected events are marked archived and removed from the ordered list of active tags, while one summary tag is inserted where the range used to be. The original objects remain addressable by their old tags. This separation between “not currently rendered” and “deleted from the system” is the basis of recovery.
Figure 1: The harness compacts at a fixed threshold above; the model edits its own context below. Extracted from the paper's original HTML.
In the harness-driven path, the system summarizes earlier history when the budget reaches 80%. In the model-driven path, the model receives a live usage signal, guidance to consider compaction only after 85%, and a pressure warning when the request approaches its limit. The warning does not force an action. The model may answer immediately, compact, inspect the API documentation first, or examine event history.
The source mapping is direct. src/nooa/runtime/events.py exposes collapse(start_tag, end_tag, summary_text) to the model-facing interface. It validates the endpoints and delegates to the event manager. The manager archives every active event in the selected interval, removes those tags from the active order, creates a summary with the range tag, and inserts that summary at the original position.
The implementation does more than substitute text. A summary records the replaced range and its child tags. The manager adds recovery instructions that tell the model how to query original events, read one by tag, or expand the summary's children. Tests verify that the first and last original events can still be accessed after collapse. This makes the summary an index over retained history, not an irreversible deletion.
Figure 2: A range becomes a summary tag while original events remain queryable by their earlier tags. Extracted from the paper's original HTML.
Visibility is enforced during prompt construction. src/nooa/runtime/context_builder.py reads active event values from the event manager. The manager obtains those values through the active-tag list, so archived originals do not silently return in a normal request. test_archived_events_excluded_from_context.py also covers query-filtered construction, because a filter applied to the wrong collection could expose archived events behind a summary.
The complete loop is therefore: observe pressure, choose a range, collapse it into a tagged summary, render only active events, preserve stable access to originals, and recover details when needed. This is distinct from a lossy transcript truncation or a generic retrieval layer. The model controls structural edits with explicit semantics.
The pressure warning supplies state that a model cannot infer reliably from the visible text alone. A provider may report different token counts, and a request can grow sharply after a tool response. Exposing remaining capacity lets the model plan. Automatically compacting at the same point removes that planning problem but also removes any opportunity for task-specific choices.
The design does not assume that model judgment is always good. A model can compact too early, produce a summary that removes a needed entity, retrieve the same archive repeatedly, or ignore the warning until the harness fallback takes control. The paper therefore measures behavior as well as final score: API use, compression factor, archive reopening, first-compaction timing, and token use.
flowchart TD
A[Live context usage] --> B{Approaching 85 percent}
B -- No --> C[Continue task]
B -- Yes --> D[Model selects event range]
D --> E[Collapse into summary tag]
E --> F{Need original detail}
F -- Yes --> G[Query or expand archived tags]
G --> C
F -- No --> H[Continue reasoning]
C --> I[Edited request]
H --> I
I --> J[Reuse unchanged suffix KV]
J --> C
Context editing creates a serving problem. Standard prefix caching reuses computation before the first changed token. A collapse introduces a new summary at the edit point, so the summary and the text after it no longer share the old prefix. A shorter prompt may still require fresh prefill for most of its later content.
Figure 12 isolates this issue. Replacing a range with a summary shortens the request, but the new summary and the downstream suffix need computation in the standard path. The prototype asks whether the unchanged suffix can retain useful KV state even though its absolute position or preceding context changed.
Figure 12: The summary and everything after the edit require fresh computation under standard prefix caching. Suffix KV reuse targets this region. Extracted from the paper's original HTML.
Let $K_{\mathrm{suf}}$ be the number of tokens in the surviving suffix and $B$ the context budget. Its fraction is:
$$\rho=\frac{K_{\mathrm{suf}}}{B}$$On OfficeQA Pro, the average surviving suffix is about 10K tokens, roughly 60% of the prompt, so $\rho\approx0.60$. Retrieved documents remain in the context while earlier conversational events are summarized. The task therefore creates a large unchanged region after the edit, unlike a workload that rewrites every message on every turn.
If $P_{\mathrm{prefix}}$ is prefill under standard prefix caching and $P_{\mathrm{suffix}}$ is prefill with suffix reuse, the reduction is:
$$\Delta_p=\frac{P_{\mathrm{prefix}}-P_{\mathrm{suffix}}}{P_{\mathrm{prefix}}}$$The SGLang prototype with Qwen3.6-27B reports a 4% to 15% reduction per request. The measured quantity is prefill compute, not wall-clock latency, scheduler overhead, or monetary cost. The distinction matters because a serving optimization can reduce arithmetic while leaving the end-to-end critical path nearly unchanged.
The system lesson is that an editable context needs a compatible inference interface. Model output can describe a compact summary, but the serving layer must know which cached blocks remain semantically reusable. If it recomputes the full edited sequence, semantic improvements in accuracy may coexist with an avoidable serving penalty.
What the experiments show
The strongest accuracy result appears at a 32K budget on OfficeQA Pro. GPT-6.1 Sol rises from 21% under harness-driven compaction to 56% under model-driven management. This is nearly a threefold increase at the same budget. The result is not a cosmetic gain in response quality: the evaluated unit is whether the agent passes the task.
The effect is concentrated at tight budgets. GPT and Kimi benefit at small windows, while Opus trails the harness until the budget becomes large enough for the strategies to converge. MLE-bench Lite shows a much smaller difference, mostly at the tightest budget, because its tasks require less context than document research. The authors do not claim that model-driven management dominates everywhere.
| Model | Task-level API use | Median compression | Archive reopened | First compaction without timing instruction |
|---|---|---|---|---|
| GPT-6.1 Sol | Within the 42% to 53% group | 3.7x | 19% | Less sensitive to the instruction |
| Kimi K3 | Within the 42% to 53% group | 2.1x | 7% | About 84% to 29% at 128K |
| DeepSeek V4 Pro | Within the 42% to 53% group | 1.8x | 3% | 83% to 40% at 256K |
| Claude Opus 5.5 | 4% | 1.5x | 14%, noisy estimate | 16% median at 128K |
All models received the same interface, but their operating styles diverged. GPT, Kimi, and DeepSeek used it in 42% to 53% of tasks, while Opus used it in only 4%. GPT compressed most aggressively, at a median factor of 3.7x, and reopened archived content after 19% of its compactions. Kimi's factors and reopening rates were 2.1x and 7%; DeepSeek's were 1.8x and 3%. Opus compressed 1.5x and reopened at 14%, but the estimate is noisy because compaction was rare.
Behavior after a pressure warning also differs. At 64K, Opus usually acknowledges the warning and wraps up. GPT reads the API documentation before compacting in 69% of the relevant episodes. DeepSeek inspects event history first in 46%, and Kimi compacts immediately in 49%. These choices are not simply right or wrong. They expose different assumptions about how much planning is needed before changing the prompt.
The paper labels premature compaction as context anxiety. With the instruction to consider compaction only near 85%, most models wait near that threshold. Remove the instruction and Kimi's median first compaction falls from about 84% to 29% at 128K. DeepSeek falls from 83% to 40% at 256K, and Opus compacts at a median of 16% at 128K. The models are preserving space while useful space still exists.
That behavior can hurt. At budgets of 128K and above, the variants without the timing instruction score about eight points below the harness baseline for Kimi and DeepSeek. GPT and Opus do not show the same change. A concise context is therefore not automatically a better context. The value depends on whether the removed material is still needed and whether the model can recover it.
| Setting | Budget | Harness accuracy | Model-driven accuracy | Model-driven input change |
|---|---|---|---|---|
| GPT-6.1 Sol | 32K | 21% | 56% | No comparable saving reported |
| Kimi K3 | 32K | 41% | 43% | 62M to 36M, 41% fewer |
| Kimi K3 | 64K | 52% | 57% | About 11% fewer |
Kimi's 32K result separates budget from consumption. Both strategies have the same maximum request size, yet the model-driven run processes 36 million cumulative input tokens instead of 62 million and scores two points higher. The model is not reading less evidence by accident. It is changing the history at useful points, reducing the amount of obsolete material carried into later requests.
At 64K, Kimi improves from 52% to 57% while using about 11% fewer cumulative input tokens. GPT does not show a comparable token reduction despite its large accuracy gain. A system may therefore trade more lookups for a higher success rate, or save tokens while losing necessary evidence. Accuracy and token efficiency are related outcomes, not interchangeable measures.
The suffix-reuse experiment uses Qwen3.6-27B at a 32K context on MLE-bench Lite, OfficeQA Pro, and the agentic coding benchmark DeepSWE. Relative to standard prefix caching, the prototype reduces prefill by 4% to 15% per request, with no measurable change in task accuracy. OfficeQA benefits most because its average surviving suffix is large.
| Dimension | Reported result | Interpretation boundary |
|---|---|---|
| Model and engine | Qwen3.6-27B, SGLang prototype | One open model and one serving implementation |
| Prefill reduction | 4% to 15% per request | Not end-to-end latency or cost |
| OfficeQA suffix | About 10K tokens, roughly 60% | Retained document text creates a large reusable region |
| Accuracy | No measurable change | Approximate reuse still needs broader validation |
The three measurements should not be collapsed into one score. Accuracy asks whether the model completes the task. Cumulative tokens ask how much history the agent transports across its trajectory. Prefill reduction asks how much serving computation remains after an edit. Together they map the model-harness-inference frontier that the paper identifies.
Code evidence and engineering implications
The public repository supports the paper's conceptual description with implementation and tests. The model-facing collapse() method validates tags and delegates to the manager. The manager changes event status, updates the active order, constructs a summary event, and preserves the archive. This is stateful infrastructure, not a prompt-only convention.
The visibility path is equally important. context_builder.py builds from active event values. If it instead filtered the complete event store, an archived original could reappear whenever a new query matched its type or content. The test suite explicitly checks both the unqueried and queried paths, because context compression is only real if every rendering route excludes the archived originals.
Recovery instructions are embedded with the summary and updated through child tags for nested collapses. The model can search originals, read one by tag, or expand the summary. This structure supports audit and repair. It also makes the summary accountable: the model can inspect what the summary replaced instead of treating it as an opaque statement.
These semantics matter for embodied agents. A long robot task combines operator constraints, sensor summaries, tool responses, plans, failures, and safety checks. Re-fetching a sensor frame may be cheap, while reconstructing an operator's one-time constraint may be impossible. A policy that always retains the latest ten events can preserve the freshest status while deleting the oldest invariant.
Production use would need more diagnostics than the paper reports. Archive reopening is a useful signal, but it does not reveal whether a summary silently changed an entity, omitted a negative result, or preserved a stale plan. Systems should track evidence references, constraint coverage, query cost, summary provenance, and the task stage at which compaction occurs.
Limitations
The authors explicitly note that both benchmarks are small. OfficeQA Pro v2 has 90 questions and MLE-bench Lite has 22 competitions. Differences between strategies or models may not be statistically significant, so the results should not be generalized into a universal performance ranking.
The second author-stated limitation is simulated context pressure. Reducing the budget forces compaction quickly, but it does not reproduce every property of a task that naturally runs for hours across tools and sessions. The hard-limit fallback removes oldest events and retries, which can itself alter scores. Some failures may therefore come from the safety path rather than the model's decision.
Third, the authors do not know how the four evaluated models were trained. The explanation that GPT may have received related training is a conjecture, not an ablation. Tool-use style, long-context training, and output conventions may all affect how readily a model adopts the context API.
Fourth, suffix KV reuse is tested with one open model in one serving engine. It is an approximation to full recomputation, and the paper measures prefill compute rather than end-to-end latency or cost. Performance and safety may change with other architectures, batching policies, cache layouts, and hardware.
A further issue is experimental symmetry. The model-driven condition receives a live meter, a timing instruction, and a pressure warning, while the harness policy is a fixed trigger. The large GPT gain may come partly from those additional signals rather than from decision ownership alone. A stronger ablation would give the harness policy the same state and vary only who chooses the compaction range.
Finally, the paper cannot show when a compressed context has become semantically wrong. Reopening reveals that the model sometimes knows it lacks information. It does not cover cases where the model confidently continues from a plausible but distorted summary. Auditable provenance and immutable task constraints should accompany model-selected compaction in high-stakes settings.
Conclusion
The paper does not argue that models should replace every harness policy. It shows that context control is useful when model behavior, prompt state, archive semantics, and inference support are designed together. Models that use the interface well can improve accuracy at tight budgets and reduce transported history; models that ignore or overuse it can lose evidence or accumulate avoidable retrieval.
NOOA supplies a concrete context substrate: range collapse, stable tags, hidden but retained originals, explicit recovery, and active-view construction. The suffix-cache prototype addresses the next layer by recognizing that edited prompts should not always pay full prefill for unchanged text after the edit.
The most valuable next steps are clear. Train models to estimate future evidence value rather than merely minimizing length. Compare model-driven and harness-driven policies with equal context signals. Evaluate real long-horizon tasks with latency, cache behavior, and safety-constraint retention, not only token counts. The central engineering question is no longer whether a context can be shortened, but whether the system can shorten it without losing the ability to reason or recover.
Golden quote
Context management succeeds when hidden history is still recoverable evidence, not when the prompt merely becomes short.



