First surfaced in Tandemly Briefing — 2026-06-19.

Agentic Search · Context Management

Masking old results
helps, or hurts.

UC San Diego researchers built a search agent framework and ran it across models from 4 billion to 284 billion parameters, three retrieval systems, and four benchmarks. The question: when you discard stale retrieved observations from a search agent's context, does it help? The answer is a regime map. It depends entirely on the gap between what your retriever finds and what your model can filter.

Core concept
Observation masking removes old retrieved content to free context budget. Its accuracy impact follows an asymmetric inverted-U against the model's base accuracy: minimal effect under a weak retriever, gains up to +12.6pp when a strong retriever meets a mid-capacity model, and sharp collapse when the model is already saturated.
scroll to explore

Context grows.
Nobody measured when to trim it.

Long-horizon search agents make many sequential retrieval calls. Each adds more text. At some point, the context becomes a liability. But "just mask the old stuff" turned out to be wrong as a universal rule.

A deep search agent does not look things up once. It runs for many turns, each fetching chunks of web content, parsing results, and deciding what to search next. The context window fills with retrieved text, prior tool calls, and the agent's own reasoning. At turn 20, the agent may be carrying 50,000 tokens of retrieved content, much of it from earlier searches that are now irrelevant.

The natural response is observation masking: after some number of turns, replace old retrieved chunks with a structural placeholder. Keep what was called and with what arguments, but discard the content itself. Less context. Less noise. The agent focuses on what it found recently.

The problem is that nobody had studied when this works. Teams were applying masking as a default, or not at all, without evidence for either choice. The accuracy impact might be positive, negative, or negligible depending on the agent's setup. The interaction between retriever quality and model capacity had never been mapped.

The question this paper asks

When does masking stale observations from a search agent's context improve accuracy, and when does it hurt? What is the underlying mechanism, and can the outcome be predicted before running the experiment?

Eight models, three retrievers,
four benchmarks.

The team built a parallel native tool-calling framework capable of running multiple search threads simultaneously, then swept it systematically across combinations of models and retrieval systems.

The study covered four benchmarks: BrowseComp-Plus (830 hard English research questions), BrowseComp-ZH (289 Chinese-language research questions), GAIA-text (103 examples), and xbench-DeepSearch (100 examples). These benchmarks require multiple tool calls per question, making them natural stress tests for context management strategies.

Backbone models ranged from Qwen and DeepSeek at the 4B scale up to 284B-parameter variants including NVIDIA Nemotron, GPT-OSS variants, and Tongyi-DeepResearch. Three different retrieval systems were tested across this sweep, including local search and web-based retrieval.

The masking function was deliberately simple: retain the K most recent tool-call results (K was swept in experiments), replace everything older with a structural placeholder recording the tool name and arguments. Tool-call errors were always retained regardless of age, so the agent could still learn from failed searches without those errors being masked away.

What "observation masking" means here

An observation is one tool-call result: a chunk of retrieved text. A stale observation is one that falls outside the retention window. The placeholder is a fixed-format string recording what was called and with what arguments, so the agent knows the structural history of the trajectory without holding the content. Tool-call errors bypass masking entirely.

Three regimes, not
one answer.

The accuracy gain from masking does not behave like a dial you turn up. It behaves like a curve that rises, peaks, and then falls sharply. Where you sit on that curve depends on two things: how good your retriever is, and how large your model is.

Peak gain
+12.6
percentage points, BrowseComp-Plus
Tongyi-DeepResearch-30B
Model size range swept
4B284B
parameters across 8 backbone models
Regimes identified
3
retriever-bottleneck, mid-capacity peak, saturated collapse
1
Retriever-bottleneck regime
The retriever is weak and the agent's retrieved content contains sparse useful signals. Masking removes the little evidence that was found. Effect on accuracy: minimal or slightly negative. There is nothing to filter because the retriever already failed to surface useful content.
2
Mid-capacity regime (the peak)
A strong retriever surfaces a lot of relevant content, but the model cannot reliably separate the useful from the noisy on its own. Masking removes older, lower-priority content and forces the model to focus on recent results. Gains of +11 to +12.6 percentage points on BrowseComp-Plus.
3
Saturated-model regime (the collapse)
A strong retriever meets a high-capacity model that can already filter context implicitly, directing attention toward the retrieved tokens it actually needs for reasoning. Masking removes those tokens. Performance drops sharply. The model was using the evidence; the masking function discarded it.
Common assumption
Masking reduces noise, so it always helps. Old retrieved content is irrelevant. Trimming it frees context budget and lets the agent focus on what it found most recently. Apply masking by default.
What the data shows
Masking impact depends on model-retriever interaction. High-capacity models direct reasoning attention toward retrieved tokens. Masking removes the evidence they were using. The effect is a curve, not a constant, and it inverts at the high end.
The mechanism: reasoning-token attention

The team used attention pattern analysis to explain why the regimes exist. High-capacity models concentrate what they call "reasoning-token attention" on tool-result tokens: the model's chain-of-thought steps attend heavily to retrieved content when forming answers. These models are doing implicit filtering through attention, not through explicit elimination.

When masking removes a stale observation, it removes the tokens those attention heads were pointing at. For high-accuracy models, that is evidence loss. For mid-capacity models, the retrieved content was producing noise rather than focused attention, so removing it helps the model focus on what it retrieved most recently.

Regime map generalizes across benchmarks

The inverted-U pattern appeared consistently across BrowseComp-Plus, BrowseComp-ZH, GAIA-text, and xbench-DeepSearch. This suggests the pattern reflects a structural property of the model-retriever interaction rather than something benchmark-specific. The same model family exhibited the same curve shape on different question types and languages.

Scope and limitations

The study covers specific retrieval systems available at the time. Regime boundaries are model-retriever-specific: the boundary between "mid-capacity" and "saturated" shifts as model sizes change. The retention window K was swept but not exhaustively optimized for every combination. Results require substantial GPU resources to reproduce (8+ A100 80G). The paper focuses on the agentic search domain; effects in other agent contexts (coding, data analysis) are not studied here.

Profile your regime
before you mask.

The key shift this paper demands is treating observation masking as a tunable decision that requires measurement, not a default that saves you computation. The question is not whether to mask. It is where you sit on the curve.

1
For search agent developers
Run your agent without masking first on a representative evaluation set. If baseline accuracy is already high (above roughly 50-60% on hard benchmarks), masking will likely reduce performance. If baseline accuracy is moderate, masking is worth testing. Set the retention window at 3 to 5 most recent tool results, exempt tool-call errors, and measure the delta before deploying.
2
For teams using multiple model sizes
Profile each backbone separately. Switching from a 7B to a 70B model may move you from the mid-capacity regime (where masking helps) into the saturated regime (where it hurts). The decision about masking is not portable across model scales without re-measurement.
3
For teams thinking about retrieval system upgrades
Improving retriever quality can shift your regime. A better retriever that surfaces more relevant content may push a previously borderline model into the mid-capacity regime where masking helps most. If you upgrade your retriever, re-evaluate your masking decision.
4
For researchers designing agent benchmarks
BrowseComp-Plus and GAIA-text tracked the regime pattern consistently across model families. These are useful additions to any context management evaluation. Hard questions requiring multiple retrieval steps are necessary for this kind of measurement; single-hop tasks may not show the regime structure at all.

Where to go
from here.

Concrete steps for applying these findings to a search agent you are building or evaluating.

1
Baseline without masking first
Run your search agent on a 50 to 100 task sample from one of the benchmarks mentioned (BrowseComp-Plus is the most sensitive diagnostic). Record accuracy with no context management applied. This single number tells you which regime you are likely in before you run any masking experiments.
2
Test a minimal retention window
Set K = 3 or K = 5 (retain only the most recent 3 or 5 tool-call results, mask everything older). Always exempt tool-call errors from masking. Measure accuracy against your baseline. If the delta is positive, you are in the mid-capacity regime and can tune K further. If negative, stop: you are likely in the saturated regime.
3
Use attention diagnostics
If you can access attention weights, examine whether reasoning steps in your model's chain-of-thought attend heavily to older tool-result tokens. High attention concentration on retrieved content is a signal of implicit filtering: the model is using that content for reasoning and masking will remove evidence it needs.
4
Explore the code
The i-DeepSearch team released the parallel native tool-calling framework used in this study at github.com/i-DeepSearch/observation-masking. The evaluation logs across all benchmarks and configurations are also available on Hugging Face at i-DeepSearch/observation-masking-eval-logs.
5
Read the paper
Zhang, H., Xu, Q., Li, Z., Zhang, L., Jiang, P., Zhang, Y., & McAuley, J. (2026). Masking Stale Observations Helps Search Agents -- Until It Doesn't: A Regime Map and Its Mechanism. UC San Diego. arXiv:2606.00408.