ReSum: Unlocking Long-Horizon Search Intelligence via Context Summarization
Read first: DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models
TL;DR. ReSum runs a normal ReAct search agent, but when the context gets close to the window limit, a summary tool compresses the whole history into one summary and the agent restarts from (question, summary). This lets it keep searching after a plain ReAct agent would overflow. ReSum-GRPO then trains the agent for this setting: each trajectory is split at its summaries, and one outcome-based GRPO advantage is given to every segment.
Why it matters now. Deep-research agents on BrowseComp-style tasks run out of context long before they run out of useful searches. ReSum is the simplest fix that works with existing ReAct agents. For an IR reader, the interesting question is what the summary keeps: it is a lossy, query-focused rewrite of everything the agent has retrieved so far, with no index behind it. This is within-trajectory working context, not cross-session memory.
Key idea
Section titled “Key idea”Problem. In ReAct the history (thoughts, actions, observations) only grows. With a 32k window, a web agent hits the limit after a few page visits and is forced to stop.
ReSum rollout (paper §3.1, Algorithm 1). Act as in ReAct. When a trigger fires (in this paper a system rule, such as approaching the token limit), call the summary tool and reset:
The summary is goal-oriented: it consolidates evidence found so far and, in practice, the gaps that remain. The run ends with an answer, or with failure when the tool-call budget is used up.
Summary tool. Any LLM can summarize, but quality varies a lot (see results). The authors build ReSumTool-30B by distilling a strong teacher into Qwen3-30B-A3B-Thinking on more than 9,000 (conversation, summary) pairs collected with a WebSailor agent as the explorer.
ReSum-GRPO (paper §3.3). A trajectory with summaries is split into segments. Each segment is a separate training sequence that starts from or from . An LLM judge gives the whole trajectory one binary reward . The GRPO advantage is computed once per trajectory over the group of rollouts and broadcast to all its segments:
Tool outputs are masked from the loss, as in other search-agent RL.
Worked trace (illustrative). A question asks for a person who meets four constraints. Segment 1: the agent searches, visits five pages and pins down two constraints; the context reaches about 30k tokens. The trigger fires. The summary records “constraint A → candidates X, Y (source pages); constraint B satisfied by X; still unknown: C and D”. Segment 2 starts from (q, summary) with a 3k context, checks C and D for X, and answers. If the answer is right, both segments get the same positive advantage, so segment 1 is rewarded for gathering evidence that survived into the summary.
| ReAct | ReSum | |
|---|---|---|
| Context | Appends every step | Resets to (q, summary) at each trigger |
| Who decides when to compress | No compression | A system trigger, not the agent |
| Training | GRPO on whole trajectories | ReSum-GRPO on segments with a broadcast advantage |
| What did not change | Tools, tool-call budget, outcome reward | |
| Evidence | Tables 1–3 (below) |
Key results
Section titled “Key results”All numbers are from arXiv v3 (March 2026). Benchmarks: GAIA (103-question text-only validation subset), BrowseComp and BrowseComp-zh, with Google search and Jina page reading. Agents have a 32k context, a 60-call tool budget unless stated, and are scored by an LLM judge (Pass@1 averaged over samples; Pass@3 over three rollouts).
- Training-free (Table 1). Averaged over settings, ReSum improves over ReAct by 4.5% (abstract). For WebSailor-3B on BrowseComp-zh: ReAct 8.2, truncating to the latest 22k tokens 13.2, ReSum with off-the-shelf Qwen3-30B as summarizer 6.9, with ReSumTool-30B 13.7, and with GPT-OSS-120B 15.2.
- Training (Table 2, 1K SailorFog-QA training questions). ReSum-GRPO adds a further 8.2% on average (abstract). WebSailor-3B on BrowseComp-zh: ReAct 8.2 → GRPO 11.8 (ReAct) → same GRPO model run with ReSum 17.3 → ReSum-GRPO 20.5. WebSailor-30B on BrowseComp: ReAct 12.8, GRPO 14.3, GRPO with ReSum 15.0, MEM1-GRPO 19.5, ReSum-GRPO 18.3; on BrowseComp-zh ReSum-GRPO is best at 33.3. The authors report that MEM1’s higher BrowseComp score costs more tokens per successful trajectory (Appendix F.3).
- Larger windows (Table 3, Tongyi-DeepResearch-30B-A3B, BrowseComp Pass@1). At 32k / 40 calls, ReAct 27.7 vs ReSum 34.5; at 128k / 120 calls, 42.2 vs 44.5. The margin shrinks as the window grows.
- Cost. ReSum-GRPO increases training time per step by about 33–69% over GRPO (Table 4), and ReSum inference costs are typically about twice those of ReAct (Appendix F.2).
Limitations & open questions
Section titled “Limitations & open questions”- “Unbounded” is about context only. The tool budget still ends runs, over-budget runs count as failures, and costs grow.
- Summary loss compounds. Each summary rewrites the previous one. A detail that seems irrelevant in segment 1 is gone by segment 3 and there is no raw log to re-read. The Qwen3-30B result shows a poor summary can be worse than plain truncation.
- Fixed trigger. The agent does not decide when to summarize; the authors leave autonomous triggering to future work.
- Credit assignment is coarse. Broadcasting one advantage cannot tell a useful early segment from a wasted one in the same successful trajectory.
- Open question. Would a summary that keeps source URLs or docids, plus the ability to re-fetch them, close most of the gap between ReSum and a full-context agent?
Connections
Section titled “Connections”- GRPO (DeepSeekMath) and Dr. GRPO: the group-normalized advantage that ReSum-GRPO broadcasts across segments.
- MemGPT: its recursive summary on queue flush is the same move, but MemGPT keeps the raw messages searchable; ReSum does not.
- Context-Folding and AgentFold: agent-decided, local compression instead of a global reset.
- Is complex agentic memory always needed? (Raw-RAG): the argument for keeping raw evidence instead of rewriting it.
- ReAct and WebSailor: the loop ReSum extends and the agents it is tested on.
- BrowseComp and BrowseComp-Plus: the long-horizon search tasks that motivate ReSum.
Questions to think through
These questions have no single right answer. Write or say your answer before you open the hints. Mark a question once you could defend your answer in a reading group.
- Derive / compute
A web agent has a 32k-token window. The question and system prompt take 1k tokens, each search or visit step adds about 2.5k tokens, and a ReSum summary is about 1.5k tokens. The tool budget is 60 calls. How many calls can plain ReAct make before it overflows, how many segments and summaries does ReSum need to use the full budget, and how many training sequences does one ReSum-GRPO group of G = 8 rollouts produce? If 3 of the 8 rollouts are judged correct, compute the advantage every token of a correct and of an incorrect rollout receives.
What a strong answer covers
- ReAct: (32k − 1k) / 2.5k ≈ 12 calls before the window is full, so most of the 60-call budget is unreachable and the run is cut off.
- ReSum: after a reset the context is about 1k + 1.5k = 2.5k, leaving room for about 11 calls per later segment; 60 calls need about 5–6 segments, so 4–5 summaries.
- One group yields about 8 × 5 ≈ 40 training sequences, one per segment, each starting from (q) or (q, s_k); that is why training takes longer than standard GRPO.
- Binary rewards with 3 of 8 correct: mean 0.375, standard deviation √(0.375 × 0.625) ≈ 0.484, so correct rollouts get about +1.29 and incorrect ones about −0.77.
- Broadcasting: every segment of a rollout gets that same value, including early segments whose own actions may have been fine; the signal is per trajectory, not per segment.
- Mechanism
For WebSailor-3B on BrowseComp-zh (Pass@1), the base agent scores 8.2 under ReAct; after standard GRPO it scores 11.8 under ReAct and 17.3 when run with ReSum; after ReSum-GRPO it scores 20.5. Explain what the policy sees during each kind of training, why a GRPO-trained ReAct agent still improves under ReSum but less than ReSum-GRPO, and what behaviour advantage broadcasting rewards.
What a strong answer covers
- Standard GRPO trains on full ReAct trajectories that start from the question alone; the policy never sees a context that starts from a summary, so resuming from (q, s) is out of distribution.
- ReSum still helps the GRPO agent because it can keep searching after the window would have overflowed; the gain from 11.8 to 17.3 is mostly extra search time.
- ReSum-GRPO trains on segments that start from (q, s_k), so the policy learns to trust and continue from summaries instead of repeating searches already summarized.
- Because every segment of a successful trajectory gets the same positive advantage, early segments are rewarded for collecting evidence that survives into good summaries, and later segments for finishing from them.
- The summary tool is a separate, frozen model during this training, so the policy can only shape what is available to summarize, not how it is summarized.
- Critique
The paper says ReSum allows "unbounded exploration" in principle. Using the paper's own setup and results (a 60-call budget, Recent History truncation at 22k tokens, results with different summary models, and the Tongyi-DeepResearch context sweep), critique what is actually unbounded, what is lossy, and propose an experiment that would show whether the summaries lose evidence the agent later needs.
What a strong answer covers
- The tool-call budget still ends runs; over-budget trajectories count as failures. The paper reports inference costs of roughly twice the original. Only the context length is kept bounded.
- Summaries are lossy: with an off-the-shelf Qwen3-30B summarizer, WebSailor-3B on BrowseComp-zh drops to 6.9, below ReAct (8.2) and below simple truncation (13.2). A bad summary can be worse than keeping the most recent raw history.
- The benefit shrinks as the window grows: on BrowseComp with Tongyi-DeepResearch, ReSum adds 6.8 points at 32k / 40 calls but 2.3 at 128k / 120 calls.
- The trigger is a fixed system rule, not a decision by the agent; autonomous triggering is left to future work.
- Experiment: log every document seen before each summary, mark which ones are gold evidence, and test whether the summary keeps their URLs and key facts; compare with an agent that can re-retrieve its own past observations from a raw log (Raw-RAG over the trajectory).
- Design
You want to run ReSum on BrowseComp-Plus, where the corpus is fixed and every document has an id and human evidence labels. Design the summary format, the trigger, and the evaluation so that the experiment says something about retrieval, not only about final accuracy.
What a strong answer covers
- Summary format: confirmed facts with the docids that support them, open sub-questions, queries already tried, and candidate answers; docids make evidence re-fetchable instead of only paraphrased.
- Trigger: a token threshold as in the paper, plus a variant that summarizes after each sub-question is resolved, to test whether timing matters.
- Metrics: accuracy, evidence recall against the BrowseComp-Plus qrels (were the gold documents ever retrieved, and were they still cited in the last summary), number of search calls and total tokens.
- Baselines at equal budget: ReAct with truncation, ReSum with the paper's summary prompt, ReSum with the docid-preserving prompt, and a context-folding agent.
- Failure analysis: questions where a gold document was retrieved before a summary but missing after it measure summary loss directly.
- Connect
ReSum, Context-Folding and AgentFold all keep a search agent's working context small. Compare what each one compresses, when it compresses, who decides, and what is lost, and say for which kind of task each design should be most fragile.
What a strong answer covers
- ReSum: compresses the whole history into one summary when a system trigger fires; the policy does not decide; loss is global and repeated with every summary.
- Context-Folding: the agent opens a branch for a subtask and, on return, the branch is replaced by a short message; the agent decides, and loss is limited to the inside of finished subtasks.
- AgentFold: at every step the agent writes a fold directive that either condenses the latest step or merges a range of earlier summaries; the agent decides, and details can be kept at fine scale.
- Fragility: ReSum on tasks where a small early detail becomes important late; Context-Folding when subtasks are badly scoped so needed details stay in a closed branch; AgentFold when a wrong deep consolidation merges away a clue.
- All three keep the policy in charge of search but not of a raw evidence log; adding docid-level provenance would make each recoverable.