Papers
Topics
Authors
Recent
Search
2000 character limit reached

Context-ReAct: Elastic Context Orchestration

Updated 4 July 2026
  • Context-ReAct is a paradigm that actively orchestrates context in long-horizon search agents using meta-operations like Compress, Rollback, and Snippet.
  • It extends the original ReAct framework by interleaving reasoning, context editing, and tool calls within a unified autoregressive pass.
  • The approach maintains an elastic, multi-resolution memory that reduces context overflow and improves accuracy through structured backtracking.

Context-ReAct is a general agentic paradigm for elastic context orchestration introduced for long-horizon search agents. It extends the ReAct formulation, in which a LLM interleaves reasoning traces with actions, by making context management itself part of the agent’s decision process. At each turn, the agent jointly emits a chain-of-thought trace rtr_t, a sequence of context-management meta-operations MtM_t, and a tool call ctc_t in one autoregressive pass; the meta-operations are then applied to the working history before the tool call is executed. The resulting objective is not merely to append past Thoughts, Acts, and Observations indefinitely, but to maintain an elastic, multi-resolution memory that is concise yet information-dense across hundreds of steps (Lu et al., 6 May 2026, Yao et al., 2022).

1. ReAct background and the motivation for context orchestration

The original ReAct framework was introduced as a way to let a single frozen LLM both reason and act in an interleaved loop. Its context ctc_t contains the full history of user input, past Thoughts, past Acts, and their Observations, and the model emits either a natural-language Thought or an environment action until it terminates with a final answer. This interleaving improves factual grounding, error correction, and interpretability: on HotpotQA and FEVER it uses a minimal Wikipedia API to reduce hallucination and error propagation, and on ALFWorld and WebShop it outperforms imitation and reinforcement learning baselines by an absolute success rate of 34%34\% and 10%10\% respectively (Yao et al., 2022).

That same append-only design becomes a liability in long-horizon settings. In the formulation emphasized by Context-ReAct, a standard ReAct agent simply appends every thought, tool call, and observation into its context, producing unbounded context growth, accumulation of noise or redundancy, and eventual context-window overflow and degradation of reasoning quality. The motivating observation is that not all past information requires the same fidelity. Fresh evidence may need verbatim retention; resolved reasoning chains may be abstracted; precision-critical facts may need exact extraction; and dead exploration branches may need to be discarded or explicitly backtracked (Lu et al., 6 May 2026).

This design shift is significant because it changes the status of context from passive transcript to actively managed working memory. A plausible implication is that Context-ReAct should be understood less as a prompt pattern and more as a memory-control layer embedded inside the agent loop.

2. Formal model and the five atomic meta-operations

Context-ReAct formalizes the agent history as a sequence H=[S1,S2,,Sn]H = [S_1, S_2, \dots, S_n]. In standard ReAct, each step is Si=(ri,ci,oi)S_i = (r_i, c_i, o_i); in Context-ReAct, each step becomes Si=(ri,Mi,ci,oi)S_i = (r_i, M_i, c_i, o_i), where MiM_i is a list of meta-operations applied to the preceding history. At each turn, the model generates reasoning, context edits, and a tool call in one pass; the edited history MtM_t0 is then used as the execution context for the tool call, and the resulting observation is appended as part of the new step (Lu et al., 6 May 2026).

The paradigm provides five atomic operations:

Operation Definition Primary role
Skip MtM_t1 Preserve context unchanged
Compress Replace a contiguous subsequence MtM_t2 with a summary string MtM_t3 Abstractively summarize resolved history
Rollback Backtrack to an earlier point MtM_t4 and retain a summary MtM_t5 of why the branch was abandoned Structural backtracking
Snippet Replace a full observation with an exact substring MtM_t6 Preserve precision-critical evidence
Delete Remove an unhelpful step MtM_t7 entirely Direct noise removal

These operations are compositional. Given a list MtM_t8, the updated history is

MtM_t9

The worked example in the LongSeeker description illustrates the intended use pattern. A search result identifying Nobel Prize laureates is first preserved, then narrowed with a Snippet operation to the exact laureate names, then folded with Compress into a compact factual summary, and later cleaned with Delete or Rollback when a side branch proves unproductive. The resulting history retains key facts in compact form, exact verbatim substrings where needed, and no noise from exploratory dead ends (Lu et al., 6 May 2026).

3. Expressive completeness and operational guarantees

A central theoretical claim in Context-ReAct is that the meta-action set

ctc_t0

is expressively complete. The proof sketch is straightforward: a single Compress operation can replace the entire history with an arbitrary string ctc_t1, and if ctc_t2 is chosen as the serialization of a target history ctc_t3, then one Compress suffices to map any input history ctc_t4 to that target history exactly. In this sense, Compress alone is “universal,” and the full operator set is trivially complete (Lu et al., 6 May 2026).

The specialized operators are retained because they provide efficiency and fidelity guarantees that a generic universal compression operator does not encode structurally. Skip is a zero-cost identity operator. Rollback has the same expressive power as a targeted Compress but frames the action as structural backtracking, encouraging classical search heuristics rather than generic summarization. Snippet is pointer-based substring extraction with no token-generation cost for the snippet itself and perfect fidelity for exact numbers, URLs, or code. Delete removes an entire step and directly reduces context length by ctc_t5 tokens (Lu et al., 6 May 2026).

This separation between expressive completeness and inductive bias is one of the defining technical features of Context-ReAct. It makes the paradigm simultaneously general and operationally constrained: the system can represent arbitrary history transformations, but it is also biased toward edits that preserve evidence fidelity and reduce hallucination risk.

4. LongSeeker as the principal implementation

LongSeeker is the principal system built on Context-ReAct. It is a long-horizon search agent fine-tuned from Qwen3-30B-A3B on ctc_t6 synthesized trajectories. The training corpus is constructed from ctc_t7 complex multi-hop questions from OpenSeeker—ctc_t8 English and ctc_t9 Chinese—and uses DeepSeek-V3.2 as a teacher running under full Context-ReAct to generate four-field structured outputs: >, <meta-tool-calls>, <motivation>, and <tool-call>. Fine-tuning is standard next-token prediction, but the loss jointly covers chain-of-thought, meta-ops, motivation, and tool call, conditioning on the curated context ctc_t0 rather than the raw append-only history (Lu et al., 6 May 2026).

The inference loop is correspondingly unified. The model first generates ctc_t1 from the current history ctc_t2, then the meta-operations are applied to produce a curated history ctc_t3, then the tool call is executed in that curated context, and finally the new step ctc_t4 is appended. This contrasts with systems that summarize only after overflow or that force the agent to reason over an ever-expanding transcript (Lu et al., 6 May 2026).

LongSeeker was evaluated on four representative search benchmarks: BrowseComp, BrowseComp-ZH, xbench-2505, and the text-only subset of GAIA. The baselines include GPT-5, Gemini-3.0-Pro, Claude-Opus-4.5, Seed-2.0-Pro, DeepSeek-V3.2, GLM-4.7, and several open ctc_t5-scale agents such as MiroThinker-1.7, AgentFold, Tongyi DeepResearch, IterResearch, and OpenSeeker (Lu et al., 6 May 2026).

5. Empirical behavior, scaling properties, and benchmark performance

Across four representative search benchmarks, LongSeeker achieves ctc_t6 on BrowseComp and ctc_t7 on BrowseComp-ZH, substantially outperforming Tongyi DeepResearch (ctc_t8 and ctc_t9) and AgentFold (34%34\%0 and 34%34\%1). On English BrowseComp specifically, LongSeeker-30B reaches 34%34\%2, compared with 34%34\%3 for Tongyi DeepResearch and 34%34\%4 for AgentFold, while DeepSeek-V3.2 reaches 34%34\%5 on a 34%34\%6 model (Lu et al., 6 May 2026).

The context dynamics are as important as the headline accuracy. Under Context-ReAct, context token growth plateaus at approximately 34%34\%7 tokens even after 34%34\%8 steps, whereas append-only ReAct exhibits linear explosion. The agent learns to leverage all five meta-operations adaptively, with Compress and Rollback used most frequently and Snippet and Delete more conservatively. Ablations against “summary-on-overflow” and “discard-all” strategies show superior step-wise performance under equal budgets (Lu et al., 6 May 2026).

The central empirical claim is therefore not only that LongSeeker is more accurate, but that it is accurate under bounded working-memory growth. This is the key distinction between Context-ReAct and passive summarization heuristics. The former performs step-wise, agent-controlled history reshaping; the latter compresses only after the context has already become problematic.

Subsequent work situates Context-ReAct within a broader class of ReAct-derived systems that treat context as an actively managed resource rather than an append-only log. SWE-AGILE introduces a Dynamic Reasoning Context strategy for software engineering agents: it keeps a “sliding window” of recent detailed reasoning traces, compresses older reasoning into concise Reasoning Digests, and reports 34%34\%9 on SWE-Bench-Verified for SWE-AGILE (SFT + RLVR), compared with 10%10\%0 for Base Qwen3-8B and 10%10\%1 for Interleaved Thinking; it also reports a trajectory-level compression rate of approximately 10%10\%2–10%10\%3 and a bounded context of less than 10%10\%4 tokens (Lian et al., 13 Apr 2026).

AdaCoM moves context management outside the agent by training an external LLM manager in front of a frozen ReAct agent. It formulates context management as an MDP over structured modification actions, discovers a Fidelity–Reliability Trade-off, and improves BrowseComp-Plus mean@3 from 10%10\%5 for ReAct to 10%10\%6 for AdaCoM, with the best improvement on Kimi at 10%10\%7; on MCP-Bench-Wiki it improves the average score from 10%10\%8 to 10%10\%9 (Yi et al., 29 May 2026).

CAT (“Context as a Tool”) makes compression and retrieval callable tools in long-horizon SWE agents. It formalizes a structured context workspace

H=[S1,S2,,Sn]H = [S_1, S_2, \dots, S_n]0

where H=[S1,S2,,Sn]H = [S_1, S_2, \dots, S_n]1 is stable task semantics, H=[S1,S2,,Sn]H = [S_1, S_2, \dots, S_n]2 is condensed long-term memory, and H=[S1,S2,,Sn]H = [S_1, S_2, \dots, S_n]3 is high-fidelity short-term interaction history. On SWE-Bench-Verified, SWE-Compressor reaches a H=[S1,S2,,Sn]H = [S_1, S_2, \dots, S_n]4 solved rate, compared with H=[S1,S2,,Sn]H = [S_1, S_2, \dots, S_n]5 for ReAct and H=[S1,S2,,Sn]H = [S_1, S_2, \dots, S_n]6 for Threshold-Compression, while token usage stabilizes at approximately H=[S1,S2,,Sn]H = [S_1, S_2, \dots, S_n]7 instead of growing toward the H=[S1,S2,,Sn]H = [S_1, S_2, \dots, S_n]8 window limit (Liu et al., 26 Dec 2025).

RP-ReAct addresses context pressure in enterprise tool-use settings by separating a Reasoner-Planner Agent from a Proxy-Execution Agent and offloading large tool outputs to external storage. With threshold H=[S1,S2,,Sn]H = [S_1, S_2, \dots, S_n]9, it retains only a preview in context and stores the rest as a pointer-addressable segment; the paper reports roughly Si=(ri,ci,oi)S_i = (r_i, c_i, o_i)0 tokens saved per heavy tool call when typical outputs are approximately Si=(ri,ci,oi)S_i = (r_i, c_i, o_i)1 tokens, and estimates that the maximum number of safely addressable steps rises from about Si=(ri,ci,oi)S_i = (r_i, c_i, o_i)2 to Si=(ri,ci,oi)S_i = (r_i, c_i, o_i)3 (Molinari et al., 3 Dec 2025).

GraphReAct applies the same expansion-then-compression logic to graph inference. It combines topological retrieval, semantic retrieval, and context refinement so that initial steps expand evidence from the graph and later steps distill and reorganize accumulated information into a compact representation. On zero-shot node classification, the full system outperforms multiple ablations, particularly those that omit context refinement (Yu et al., 8 May 2026).

A common misconception is to treat every use of “REACT” or “Context-ReAct” as part of the same lineage. That is not always the case. “Relaxed Efficient Acquisition of Context and Temporal features” is a longitudinal active feature acquisition framework for biomedical settings, with onboarding context masks, temporal acquisition masks, and ST-Gumbel-Sigmoid optimization under explicit cost constraints, rather than an agentic reasoning-and-tool-use context-orchestration paradigm (Qu et al., 11 Mar 2026). This distinction matters because the shared terminology masks substantially different problem formulations.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Context-ReAct.