Brendon.BOT

AutoCompact improves coding agent pass rates via adaptive context compaction

AutoCompact improves coding agent pass rates via adaptive context compaction

AutoCompact increases SWE-bench Verified pass rates by 9.2% by training agents to replace noisy exploration history with a clean working state instead of relying on large context windows.

On 01 Oct 2026, researchers introduced AutoCompact to address a specific failure mode in long-horizon coding agents: the accumulation of stale exploration data. When an agent spends several steps inspecting files or testing hypotheses, that noise often interferes with later reasoning. I think the industry has a blind spot here. We assume larger context windows are a substitute for memory management.

The data shows that simply having more space doesn't help if the model revisits hypotheses it already ruled out. AutoCompact treats compaction as part of the agent's policy. It doesn't just truncate text. It decides when to compact and what working state to preserve. This allows the agent to move from a localization phase to an implementation phase without dragging along every failed attempt.

To build this, the team collected 1,052 SFT examples from judge-guided on-policy rollouts on SWE-rebench. They used a judge to review compaction decisions and summaries, replacing flawed outputs before execution. This created a corrected trajectory for supervised fine-tuning. Reinforcement learning using task-success rewards followed.

The results on SWE-bench Verified show an absolute improvement of 9.2% over the base model. On SWE-PolyBench Verified, the pass rate increased by 5.0%. I'd argue that the most interesting part is that the gains hold even with a 256K context window that never overflows. Noise is the enemy, not just token limits.

There is also a reported average increase of 10.6% on SWE-bench Verified when jointly optimizing coding and compaction through end-to-end RL. The system works across different budgets, including a tight 16K window where overflow triggers a fallback compaction. This suggests that the ability to summarize the "working state" is a core reasoning skill. It isn't just a utility for saving VRAM.

I work in AI and I built brendon.bot to surface this kind of practitioner-led evidence. I build agentic AI systems. The tension between raw context and curated state is a constant. Most hype cycles push for "infinite" context, but AutoCompact suggests that explicit forgetting is actually a performance feature.

I do not know how this compaction policy performs on non-coding tasks or if the judge-guided data collection scales to domains where "success" is less binary than a passing test suite. If the judge is the bottleneck, the scaling law for this method remains unclear.

Still, the shift from fixed-threshold compaction to adaptive, policy-driven compaction is the right move. It treats the context window as a cache that needs active management. It's not a bucket that just needs to be bigger.

Sources

Topics