Paper: 2611.25673 — CompAct-Bench: A Benchmark for Working-Context Compaction in Long-Horizon Agent Tasks
Authors: Jiayi Chen, Lizhe Chen, Yujia Chen, Shihan Dou, Ming Zhang, Chendi Ge, Shiguang Ni, Tao Gui, Qi Zhang, Xuanjing Huang, Maxm Pan
Category: cs.AI
Reading scope: Original arXiv v1 HTML main text and appendices on implementation, length calibration, uncertainty, execution stages, state persistence and error analysis. Main and cited appendix tables were checked in the extracted HTML. Figure captions were read; graphics and the detailed Appendix H cases were not inspected. The benchmark was not reproduced.
The Problem
Imagine a coding agent halfway through a bug fix. It has edited a file, rejected one explanation, and still needs to check a particular behavior. Its conversation is condensed so work can continue. The file survives on disk, but the shorter record might lose why the edit was chosen or turn “this could be the cause” into “the cause is confirmed.” This is an illustrative situation, not a benchmark case.
A summary can retain the topic while losing the state needed for the next action. Jiayi Chen and colleagues make that distinction measurable with CompAct-Bench. Instead of judging a summary against a human-written reference, they ask a fixed agent to resume the actual task from the shortened record and check whether it finishes (§§1–2).
The contribution is a benchmark and accompanying analysis of working-context compaction. It evaluates the model that writes the shortened record separately from the agent that uses it, while preserving the task’s live environment.
The Explanation
Pause solved work, then generate a new continuation
The benchmark contains 200 tasks: 79 information searches, 96 coding tasks, and 25 workspace tasks. They come from BrowseComp, SWE-bench and the internal CompanyBench suite. The fixed executor must solve each retained task in all three screening runs, and reference trajectories must contain at least eight interaction rounds. This selects work the executor can already do, rather than mixing compaction failures with initially unsolvable tasks (§2.1; Table 1).
Each task is assigned one checkpoint, near 25%, 50% or 75% of its reference trajectory’s actions. The groups are stratified by trajectory length. These are hypothetical compaction boundaries, not observations of when a deployed product actually reaches its context limit.
The compactor shortens the interaction body to a target of 10% of its original character count. The system prompt and original task remain intact outside that budget. An iterative calibration procedure can make several model calls to approach the target; the measure is not a promise to retain exactly 10% of tokens or of the complete assembled prompt (§2.2; Appendices A.2 and B).
The executor then starts a new continuation from the recorded boundary environment. It receives only as many further actions as the successful reference needed after that point. For illustration, a 20-action reference paused after action 15 leaves five further actions. Repeating earlier work can consume those five even if recovery would succeed with more time.
Each final compacted record is held fixed for three independently generated continuations. Avg@3 averages their success indicators; it does not award success merely because one of three tries works. The executor is fixed within each domain, and success requires finishing within the action budget and passing that domain’s evaluator (§3.1; Appendix A.3–A.4).
Across twelve compactors, the reported overall accuracy averages 56.7%. Claude Opus 5 has the highest observed score, 68.5%, with a task-bootstrap 95% interval of 62.0–74.5%. These are outcomes on the screened tasks under this aggressive compaction protocol, rather than a general failure rate for agents or a score for prose quality (§3.2; Table 2; Appendix D.1).
The files can carry some of the memory
The coding example has an advantage a search task may lack: completed edits remain in the environment. The stage results make this difference visible. Averaged across compactors, the assigned boundary groups show:
| Task domain | Early, 25% | Middle, 50% | Late, 75% |
|---|---|---|---|
| Search | 52.9% | 42.6% | 34.6% |
| Coding | 64.0% | 72.7% | 86.1% |
Later boundaries contain more history in both domains, yet their success rates move in opposite directions. These are comparisons between different assigned task groups, not repeated measurements of every task at all three checkpoints (§3.3; Appendix E).
A controlled state comparison strengthens the explanation. At the late coding boundary, an executor given no prior history and no summary succeeds 15.6% of the time from the initial repository state. Reconstructing the boundary environment raises that to 71.9% under the same remaining-action budget. Reconstruction replays prior tool actions, including file edits and persistent shell effects; it does not feed their transcript back to the executor (§3.4; Appendix F.1–F.4).
Giving the executor a compacted record on top of that environment raises the late coding result to 86.1%. Persisted work therefore reduces the burden on the summary but does not eliminate it. The summary can still carry decisions, rejected alternatives and pending obligations that a file alone does not explain. At the early coding boundary, the summary adds no clear benefit in the reported comparison: 64.0% versus 66.7% without it.
Search has no corresponding repository progress. Candidate identities, exclusions and verification status live in the interaction history. At the late boundary, a summary improves search continuation from 7.4% to 34.6%. Its role is substantial even though most continuations still fail within the strict budget (Appendix F.4; Table 14).
Keeping a fact is different from keeping its status
The failure analysis separates omissions from changes in meaning. A summary can drop a located resource, forget that a test remains pending, reopen a rejected hypothesis, or promote a tentative explanation to a settled conclusion. The last error changes what the next agent believes it is entitled to do, even if the same entity names survive.
Among failed continuations, critical omissions are associated with an 18.2-percentage-point increase in repeated completed work compared with failed cases without that label. Constraint or goal distortion is associated with 10.5 points more unverified commitment. These are associations within the failed subset, not causal effect estimates for all tasks (§3.5; Appendix G.3; Table 17).
The annotations distinguish boundary-state facts, execution progress, what is confirmed or unresolved, and task constraints. The coding agent in the opening example needs all four: the relevant file, the completed edit, the still-tentative diagnosis, and the outstanding check. A shorter record must preserve their relationships, not merely their vocabulary.
Core Concepts
Working state. A record of what is known, done, rejected and still required. It points forward to the next action, whereas a retrospective history can simply describe what happened.
Persistent environment. Files and other lasting effects of tool actions can preserve progress outside the text. They complement the compacted record; they do not automatically preserve the reasoning or verification status behind an edit.
Functional evaluation. The summary is evaluated through a new task continuation under fixed conditions. This measures whether it supports execution, with rollout variability reflected in the three-run average.
The Insight
The right amount to preserve depends on where the work now lives. Materialized changes can be recovered from the environment; unresolved judgments and pending obligations may exist only in the record. Compaction needs to carry those states accurately, including their uncertainty.
A Critical Reading
The benchmark’s selection rule is useful for exposing disruption on work the executor can solve, but limits generalization to all agent tasks. The checkpoints are assigned, each task undergoes one compaction event, and the fixed continuation budget penalizes recovery that takes more actions than the original path. Repeated compactions and systems that allow longer recovery are different settings (§2; Appendix A.4).
The environment comparison directly varies persisted state. The error–behavior analysis has a weaker claim: its labels are generated by a model, checked for source quotations and reviewed by humans on a subset, then compared within failed continuations. It supports plausible pathways without proving which particular omission caused each failure (Appendix G).
The domains also use different executors and evaluators. Search is judged by a model, coding by repository tests, and workspace work by its native evaluator. CompanyBench is an internal validation domain, so the 200-task overall result includes material beyond the public benchmark core. Length calibration is approximate and can require many calls; the leaderboard is not a latency or cost comparison (§2.1; Appendices A–B).
What You Can Use
For a coding-agent handoff, preserve the changed artifact, what checks actually established, which explanation remains tentative, and the next obligation. Let the repository carry the edit while the record carries its status. Test a compaction policy by resuming real work under a defined budget, not just by reading its summary. The benchmark offers a way to measure this; it does not establish a universally safe compression ratio.
论文:2611.25673 — CompAct-Bench: A Benchmark for Working-Context Compaction in Long-Horizon Agent Tasks
作者:Jiayi Chen、Lizhe Chen、Yujia Chen、Shihan Dou、Ming Zhang、Chendi Ge、Shiguang Ni、Tao Gui、Qi Zhang、Xuanjing Huang、Maxm Pan
分类:cs.AI
阅读范围:阅读 arXiv v1 原始 HTML 的正文,以及实现、长度校准、不确定性、执行阶段、状态持久化与错误分析附录,核对正文及引用的附录表。
读了图注,未查看图像或附录 H 的详细案例;未复现基准。
问题
设想一个代码助手修到一半:文件已经改过,一种解释已经排除,某个运行条件还没检查。 为了继续工作,它的对话记录压短了。 文件仍在磁盘上,可短记录可能丢掉为什么这样改,也可能把「这也许是原因」写成「原因已经确认」。 这是帮助理解的假想场景,不是论文的基准案例。
摘要能留住话题,却丢掉下一步需要的状态。 Jiayi Chen 等人用 CompAct-Bench 把这道差别变成可测的任务:不拿摘要与人工参考答案比,而是让固定的助手从短记录接着做,检查原任务能否完成,见第 1—2 节。
贡献是一套工作上下文压缩基准及分析。 它把写短记录的模型与使用记录的执行助手分开评价,同时保留任务当时的实际环境。
翻译
停下已经会做的任务,再重新续做
基准有两百项任务:79 项信息搜索、96 项代码任务、25 项工作区任务,来自 BrowseComp、SWE-bench 和内部 CompanyBench。 固定的执行助手先对每项任务跑三次,三次都成功才保留;参考轨迹还须至少有八轮交互。 这样,压缩后的失败就不会简单混进原本不会做的任务里,见第 2.1 节及表 1。
每项任务分配一个暂停点,约在参考轨迹动作数的 25%、50% 或 75% 处,并按轨迹长度分层安排。 这是人为设定的压缩边界,不是观测实际产品何时触及上下文上限。
压缩模型把交互正文缩到目标长度:原字符数的 10%。 系统提示与原任务指令照原样保留,不占这份正文额度。 迭代校准会多次调用模型,让长度接近目标;它不等于保留恰好一成 token,也不等于整份组装后的提示词只剩一成,见第 2.2 节及附录 A.2、B。
执行助手从暂停点的环境开始,重新生成后续动作,不照着成功轨迹重放答案。 可用的动作数,限制为原来成功轨迹在暂停点后用掉的数量。 举个假想数目:原轨迹共二十步,十五步后暂停,续做只剩五步额度。 重做旧工作可能把五步用尽,即使多给时间本来能恢复。
最终短记录固定下来,再独立续做三次。 Avg@3 取三次成败值的平均,不是三次里只要一次成功就算通过。 每个领域里的执行模型固定;成功既要不超动作额度,也要通过原领域的评价器,见第 3.1 节及附录 A.3—A.4。
十二个压缩模型的总体成功率平均为 56.7%。 Claude Opus 5 得到最高观测值 68.5%,按任务重采样得到的 95% 区间为 62.0%—74.5%。 这些比例描述经过筛选的任务在这套强压缩协议下的续做结果,不是所有助手的通用失败率,也不是摘要文笔得分,见第 3.2 节、表 2 及附录 D.1。
文件可以替记录留住一部分进度
开头那个代码助手有一项搜索任务未必具备的优势:已经做成的修改仍在环境里。 按十二个压缩模型取平均,各暂停阶段的任务组呈现出这份差别:
| 任务领域 | 较早,25% | 中间,50% | 较晚,75% |
|---|---|---|---|
| 搜索 | 52.9% | 42.6% | 34.6% |
| 代码 | 64.0% | 72.7% | 86.1% |
两种任务到后期都有更多历史,成功率却朝相反方向走。 这里比的是分配到不同阶段的任务组,不是把每项任务都在三个暂停点重复测量,见第 3.3 节及附录 E。
一个受控的环境比较,让解释更具体。 在代码任务的较晚暂停点,不给原历史,也不给摘要,从初始仓库状态续做,成功率为 15.6%;重建暂停点的环境,按同样的剩余动作额度续做,达到 71.9%。 重建会重放此前的工具操作,包括文件修改和能留下来的 shell 副作用,但不会把这些操作记录重新塞进助手的上下文,见第 3.4 节及附录 F.1—F.4。
在这份环境上再提供压缩记录,较晚代码任务达到 86.1%。 已经落地的工作减轻了摘要负担,却没有取消它的作用。 为什么这样决定、哪些路已经排除、还有哪项义务没做,文件本身未必讲得清。 较早代码任务的对照中,摘要也没有显示明确收益:有摘要为 64.0%,没有为 66.7%。
搜索没有相应的仓库进度。 候选对象、排除理由与验证状态,主要留在交互历史里。 较晚暂停点提供摘要,把搜索续做成功率从 7.4% 提到 34.6%。 它的作用很大,严格动作额度下却仍有多数续做失败,见附录 F.4 及表 14。
留住一个事实,不等于留住它的状态
失败分析把遗漏与意义变化分开。 摘要可能丢掉已经找到的资源,忘掉某次测试还没完成,重新打开已排除的猜想,或把待证的解释写成定论。 最后一种变化,即使保留了同样的人名和文件名,也会改变后续助手以为自己可以做什么。
只在失败的续做里比较,有关键遗漏标签的案例,比没有这类标签的失败案例,多出 18.2 个百分点的已完成工作重做;约束或目标失真,则与 多出 10.5 个百分点的未验证就作决定相关。 这不是所有任务上的因果效应估计,而是失败子集里的关联,见第 3.5 节、附录 G.3 及表 17。
标注分别检查边界处的事实、执行进度、确认或未决状态,以及任务限制。 开头的代码助手需要四者接在一起:相关文件、已完成的修改、仍属猜想的诊断,以及剩下的检查。 短记录需要留下这份关系,不能只留下词语。
核心概念
工作状态。 什么已经知道、做过、排除,还有什么必须做。 它指向下一步;回顾式历史只描述发生过什么,也可以成立。
持久环境。 文件和工具操作的长期副作用,可以在文本之外保存进度。 它们与短记录互补,却不会自动保存某次修改背后的推理和验证状态。
功能性评价。 把短记录交给新生成的任务续做,在固定条件下看能否完成。 三次续做的平均,把执行本身的波动也反映进结果里。
洞见
该保留多少,要看工作如今存在哪里。 已经落地的修改,可以从环境里读回;未决判断与待办义务,却可能只在记录里。 压缩需要准确携带这些状态,也包括其中的不确定性。
博导审稿
筛选规则适合暴露原本会做的工作怎样被打断,却限制了结果向所有任务推广。 暂停点人为分配,每项任务只经历一次压缩,固定动作额度还会把比原路径更费步骤的恢复算成失败。 连续多次压缩、允许更长恢复的系统,属于不同条件,见第 2 节及附录 A.4。
环境比较直接改变了持久状态;错误与行为分析的结论要弱一些。 标签先由模型生成,核对引用,并由人检查一个子集,再在失败续做里比较。 它支持合理的失效路径,没有证明每次失败究竟由哪个遗漏造成,见附录 G。
三个领域还使用不同的执行模型与评价器:搜索由模型判答案,代码用仓库测试,工作区用原生评价器。 CompanyBench 是内部验证领域,两百项总体结果并不全部来自公开基准核心。 长度校准也只是接近目标,可能需要多次调用;排名不能直接当成延迟或费用排名,见第 2.1 节及附录 A—B。
启发
给代码助手交接时,留下改了哪个对象、检查实际证明了什么、哪项解释还没坐实,以及下一项义务。 让仓库留下修改,让记录留下修改的状态。 评价压缩策略,要让真实工作在规定额度下接着跑,而不能只读一遍摘要。 这套基准提供了测量办法,还没有证明一个处处安全的压缩比例。