RECAP Framework Lets Long-Horizon Agents Compress or Forget History Under Risk Control

RECAP Framework Lets Long-Horizon Agents Compress or Forget History Under Risk Control

arXiv paper 2610.22897, posted on 19 October 2026 in cs.AI, introduces RECAP, a framework that turns a long-horizon agent's handling of its own history into a three-way choice — keep, compress or remove — and backs each choice with an independent policy certificate. The premise is narrow: agents do learn from failure, but the value of a single failure record shifts as execution proceeds, so full-history retention can end up misleading the agent it was meant to teach. RECAP compares every

The paper appeared on 19 October 2026 as arXiv preprint 2610.22897, classified under cs.AI, titled “When to Forget: Risk-Controlled Context Adaptation for Long-Horizon Agents.” Its question is concrete: long-horizon agents do learn from failure, yet the value of the same failure record changes as execution advances, and a lesson that helped early can mislead later. The authors split the retention question into three actions — KEEP, COMPRESS and REMOVE — and measure each against a single full-history KEEP baseline. To remove the usual confound, RECAP applies matched context interventions: different treatments run under identical environment states and identical rollout seeds, so success-rate gaps trace back to the context treatment rather than to divergent trajectories. The framework therefore has three parts: matched interventions create comparable conditions, execution-relational

Long-horizon agents became a major investment target through 2025 and 2026: multi-step tool use, repository-scale bug fixing and browser or desktop control routinely run tens to hundreds of steps, and the context for a single task grows linearly with step count. Three approaches dominated. Sliding windows truncate the oldest history, summarisation compresses it into a short passage, and external vector stores retrieve prior experience on demand; Reflexion-style work writes failure reflections explicitly back into context. All share one trait: writing is policy-driven, deletion is heuristic. Truncation keys on position, summarisation on length, retrieval on similarity, and none of them

Liu Gong's take: making forgetting a certified decision will shape long-horizon agent reliability over the next 12 months more than another jump in context-window size. The interesting part of RECAP is not the three actions but the matched-intervention design. Change one context block and every downstream token changes with it, so raw success rates are nearly impossible to attribute; aligning environment state and rollout seeds turns keep, compress and remove into genuine treatment arms. That moves memory management from tuning folklore onto experimental rails. The cost is equally real: paired rollouts at each decision point scale with task length, which makes the method a better fit for offline policy mining than for live in-loop control in the near term. On the business side, three actions convert memory from a binary switch into a dial. Most production stacks offer keep or drop; compression is continuous, and the compression ratio is itself a tunable parameter. The selling point shifts from how many tokens a system can hold to how many it can avoid spending without losing success rate, a direct cost lever for anything billed by token. For the industry, Liu Gong has seen the same structure in industrial visual inspection: a defect-image library that only grows turns older batches into noise for the current one, and miss rates creep upward. RECAP's execution-relational predictor encodes the right criterion — not whether a record is old, but how it relates to the present state. Liu Gong predicts that within six months a cluster of agent frameworks will ship context-intervention policies as a standalone module, with certification reduced to rule sets or a small scorer; the real dividing line will be whether anyone publishes a cross-task, cross-model benchmark. Without one, when to forget stays a vendor-specific engineering dialect.

  • Decision space: three actions (keep, compress, remove) against a single full-history KEEP baseline, expanding the treatment set from one path to three.
  • Architecture: three modules — matched context interventions, execution-relational prediction, independent policy certification — with certification decoupled from prediction, adding a veto layer to the decision chain.
  • Controls: comparisons run under identical environment states and identical rollout seeds, leaving one controlled variable, the context treatment itself.
  • Scale context: frontier long-context models sit in the 128K to 1M token range, while long-horizon tasks routinely run tens to hundreds of steps, so full retention grows

For the industry: within three months, context intervention of this kind is more likely to be absorbed into agent frameworks as a new evaluation column and a set of open scripts than to ship as a standalone product. Within a year, if a public cross-task benchmark appears, a context-budget-versus-success curve could replace window length as the comparison metric for models and frameworks, and memory-layer startups would have to re-pitch from remembering more to forgetting better. For end users: little visible change in the short run beyond a lower chance that a long task — chained bookings, cross-app file cleanup, extended code repair — loses track of its own goal midway. Within a year, if

Questions worth exploring:

  • Treating deletion as a verifiable decision: whether this matched-intervention design transfers to memory eviction in RAG pipelines.
  • The cost arithmetic of paired rollouts: where offline policy mining ends and live in-loop intervention begins.
  • The metric fight: whether a context-budget-versus-success curve displaces window length as the headline claim.

Further reading: 2026 Frontier LLM Comparison: A Practical Guide — a durable, evergreen reference. Bookmark it.

This item comes from arXiv cs.AI (published 2026-10-19 04:00:00). Wenfeng Radar provides a Chinese/English summary and commentary on overseas AI developments; the original content is owned by its author.


Daily aggregation of overseas AI developments with in-depth analysis. Bookmark us to never miss an important signal; back to homepage.

Republishing: feel free to quote or repost with a link back to the original article on Wenfeng Radar. · Business & partnership: see our media kit
Daily briefing + Sunday review · Unsubscribe anytime by replying · Your email stays private

Leave a Reply

Your email address will not be published. Required fields are marked *

中文EN
Contact · Privacy · Disclaimer · AI Disclosure · Weekly Review · Media & Business
Email: wenfengleida@wenfengleida.cn