Skip to content
NewA calmer, faster ZeroHour

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

arXiv cs.AI / cs.LG / cs.CLby Xuan Zhang ()1 min read3 · 2 reads
AI summary · grok-4.7Summaries by Vani AI

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.

Key facts
  • 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.
Explain this AI news with Vani AIWhat was announced, what is new and why it matters, in a new chat

From the original article

1 min read at arxiv.org

Coding 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.

arXiv cs.AI / cs.LG / cs.CL

By Xuan Zhang · arxiv.org

Read the full article at arXiv cs.AI / cs.LG / cs.CL

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.