First surfaced in Tandemly Briefing — 2026-06-19.
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.
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.
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.
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.
Tongyi-DeepResearch-30B
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.
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.
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.
Where to go
from here.
Concrete steps for applying these findings to a search agent you are building or evaluating.