cd /news/ai-agents/recap-training-long-horizon-llm-agen… · home › topics › ai-agents › article
[ARTICLE · art-175937] src=machinebrief.com ↗ pub= topic=ai-agents verified=true sentiment=↑ positive

RECAP: Training Long-horizon LLM Agents with Context Compaction

A new reinforcement learning framework called RECAP trains long-horizon LLM agents to compact context by rewarding summaries that preserve the behavior induced by the original interaction history, according to the arXiv paper 2611.31258v1. On Qwen3.5-4B, RECAP beat task-reward-only RL baselines by an absolute 4.6% on BrowseComp-plus and 4.3% on SWE-bench Verified. The authors formalize the approach with a behavior distortion objective whose gradient splits into a distortion-based reward for summary generation and self-distillation for subsequent actions, and ablations show joint supervision of summary generation and post-compaction behavior is what drives the gains.

recommendation

When training long-horizon agents, supervise summary generation with a behavior-distortion reward alongside self-distillation on post-compaction actions instead of relying on task reward alone.

more in playbook: Designing agent systems
by read1 min views2 publishedNov 25, 2026

arXiv:2611.31258v1 Announce Type: new Abstract: Context compaction enables large language model agents to tackle long-horizon tasks within limited context budgets by replacing interaction histories with compressed summaries. However, learning effective compaction jointly with the agent policy remains challenging, as summaries affect task success over many subsequent interactions. We introduce RECAP, a reinforcement learning (RL) framework based on the principle that a summary should preserve the behavior induced by the original interaction history. We formalize this principle with a behavior distortion objective that measures the divergence between the agent's subsequent behavior under compressed and original contexts. We show that the gradient of the distortion objective decomposes into two complementary learning signals: distortion-based reward for summary generation and self-distillation for subsequent actions. Experiments on Qwen3.5-4B show that RECAP consistently outperforms the task-reward-only RL baselines on both environments, leading to an absolute improvement of 4.6% and 4.3% on BrowseComp-plus and SWE-bench Verified, respectively. Ablations further highlight the value of jointly supervising summary generation and post-compaction behavior for RECAP.

── more in #ai-agents 4 stories · sorted by recency
── more on @recap 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/recap-training-long-…] indexed:0 read:1min 2026-11-25 · —