Skip to content

ReSum: Unlocking Long-Horizon Search Intelligence via Context Summarization

optionalcorefrontierpaperrubric 10/122025 · ~35 min

Xixi Wu, Kuan Li, Yida Zhao, … Jingren Zhou

Read first: DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models

Status

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.

ReSum: periodic summarization resets the working history; ReSum-GRPO broadcasts one advantage to every segment Top: one rollout. Segment 1 starts from the question and runs ReAct steps until a trigger fires near the context limit. A summary tool writes summary s1 and the history is reset to the question plus s1. Segment 2 continues from that state until the next trigger, a second summary s2 resets it again, and segment 3 ends with an answer. Middle: the context length grows within each segment and drops at every summary, staying under the window limit; the total number of tool calls is still capped by a budget. Bottom: ReSum-GRPO. The trajectory gets one judged reward. The group-normalized advantage is computed per trajectory and the same value is assigned to every segment, each of which is trained as a separate sequence with tool outputs masked. ReSum rollout: act, summarize near the limit, restart from (q, s) segment 1q + ReAct stepsuntil trigger π_sumwrites s₁reset segment 2start: (q, s₁)+ ReAct steps π_sumwrites s₂reset segment 3start: (q, s₂)→ answer context length window limit tool calls keep counting across segments; the run fails if the budget is exhausted ReSum-GRPO (training): one reward, broadcast to every segment G rollouts per question; an LLM judge gives each trajectory one binary reward R Â = (R − mean of group) / std of group, computed once per trajectory each segment = its own training sequence with the same Â; tool outputs masked
Original sketch. Context length grows within a segment and drops at each summary; the tool-call budget still ends the run.

Problem. In ReAct the history Ht=(q,τ1,a1,o1,…,τt,at,ot)\mathcal{H}_t = (q, \tau_1, a_1, o_1, \ldots, \tau_t, a_t, o_t) (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:

s∼πsum(⋅∣Ht),Ht←(q,s).s \sim \pi_{\text{sum}}(\cdot \mid \mathcal{H}_t), \qquad \mathcal{H}_t \leftarrow (q, s).

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 BB 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 KK summaries is split into K+1K+1 segments. Each segment is a separate training sequence that starts from qq or from (q,sk)(q, s_k). An LLM judge gives the whole trajectory one binary reward RR. The GRPO advantage is computed once per trajectory over the group of GG rollouts and broadcast to all its segments:

A^g=Rg−mean⁡({Rj}j=1G)std⁡({Rj}j=1G),A^g,i=A^g  for every segment i.\hat{A}_g = \frac{R_g - \operatorname{mean}(\{R_j\}_{j=1}^{G})}{\operatorname{std}(\{R_j\}_{j=1}^{G})}, \qquad \hat{A}_{g,i} = \hat{A}_g \ \text{ for every segment } i.

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.

ReActReSum
ContextAppends every stepResets to (q, summary) at each trigger
Who decides when to compressNo compressionA system trigger, not the agent
TrainingGRPO on whole trajectoriesReSum-GRPO on segments with a broadcast advantage
What did not changeTools, tool-call budget, outcome reward
EvidenceTables 1–3 (below)

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).
  • “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?

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.

  1. 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.
  2. 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.
  3. 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).
  4. 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.
  5. 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.

Done with this page?

Status