Megadose Built for builders and researchers.

AutoCompact: Learning When to Compact Context in Long-Horizon Coding Agents

· ArXiv · AI/CL/LG ·
AutoCompact trains coding agents to decide when and how to compress their own working context.

The paper treats compaction as part of the agent’s policy, not just a safeguard against context overflow. Its training setup uses a judge to review compaction choices, summaries, and post-compaction actions, replacing flawed outputs before the trajectory continues. After supervised fine-tuning and reinforcement learning, AutoCompact improves pass rates by 9.2 points on SWE-bench Verified and 5.0 points on SWE-PolyBench Verified. The gains are reported across inference budgets, including both 256K-context runs and 16K-context runs with fallback compaction. ArXiv · AI/CL/LG's note

score 5

Categories: Research