AutoCompact: Learning When to Compact Context in Long-Horizon Coding Agents
AutoCompact trains coding agents to compact context, raising SWE-bench Verified pass rates by 9.2 points.
AutoCompact trains a coding agent to decide when to compact context, what state to preserve, and how to resume. A judge reviews and corrects flawed compaction decisions, summaries, and follow-on actions before trajectories continue. Supervised fine-tuning is followed by reinforcement learning with task-success rewards. On SWE-bench Verified and SWE-PolyBench Verified, pass rates rise by 9.2 and 5.0 absolute points across tested context budgets.
- A judge corrects compaction decisions before trajectories continue.
- SFT then RL jointly optimize coding and compaction.
- SWE-bench Verified pass rate rises 9.2 points.
- SWE-PolyBench Verified improves by 5.0 points.
- Gains hold for 256K and overflow-prone 16K windows.
From the original article
1 min read at arxiv.orgCoding agents solve repository-level software engineering tasks through long trajectories of code inspection, search, editing, and testing. As a task progresses, earlier exploration becomes stale, so managing context is more than avoiding overflow: an agent must decide when to compact, what working state to preserve, and how to continue from it.
By Xuan Zhang · arxiv.org
A short excerpt; the article and its images belong to the publisher. Summary, key facts and assessment above are AI-written from the article and can be wrong.