智能体
x.com ·
@omarsar0
AutoCompact:训练编码 Agent 自主决定何时压缩上下文
该帖介绍 AutoCompact 论文,其训练 agent 自行决定何时压缩上下文、保留哪些工作状态以及如何恢复。流程为:先由 judge 审查基座 agent 的压缩决策并替换有缺陷的决策,再用修正后的轨迹做 SFT,随后以任务成功奖励进行 RL,联合训练编码与压缩。结果显示 SWE-bench Verified 通过率提升 9.2 分、SWE-PolyBench Verified 提升 5.0 分,且在 256K 窗口从不溢出的情况下仍有增益。作者指出规模化表现与跨 harness 鲁棒性尚待验证,并称该主动压缩属于模型-harness 协同设计。
AI推荐理由 介绍 AutoCompact 论文:训练 agent 自行决定何时压缩上下文、保留哪些工作状态及如何恢复,在 SWE-bench Verified 提升 9.2 分、SWE-PolyBench Verified 提升 5.0 分,且 256K 窗口不溢出时仍有增益,属于模型-harness 协同设计方向的具体新工作;作者也指出规模化与跨 harness 鲁棒性尚待验证,信息较完整但为二手转述。
80
浏览 5,412
点赞 69
评论 24
转发 9
正文
First AutoHarness, then AutoContext, now AutoCompact.
I am seeing a rising trend of work that trains models to natively support more of what the harness does.
This work specifically trains agents to decide for themselves when to compact.
Reminds me of the new paper from Meta that trains models to manage context natively.
But how good is this approach?
AutoCompact trains the agent to decide when to compact, what working state to keep, and how to resume.
A judge first reviews the base agent's compaction decisions and replaces flawed ones before they execute. The corrected trajectories are used for SFT, then RL with task-success rewards trains coding and compaction together.
Pass rates improve by 9.2 points on SWE-bench Verified and 5.0 points on SWE-PolyBench Verified.
The gain holds even with a 256K window that never overflows, so learned compaction helps when context space is not the limit.
It remains to be seen how this works at scale and how robust it is across harnesses.
One interesting note from the authors is that this type of proactive compaction is a form of model-harness co-design: the harness provides the compaction mechanism, while the model learns when to invoke it, what to preserve, and how to continue afterward.
Even more interesting is how to combine the rule-based compaction techniques already packaged in harnesses with more model-invoked proactive ones.
Paper: [arxiv.org/abs/2610.02163](https://arxiv.org/abs/2610.02163)
Chat with Paper: [academy.dair.ai/papers/autocom…](https://academy.dair.ai/papers/autocompact-learning-when-to-compact-context-in-long-horizon-coding-agents-2610.02163)
