AI/ ai · coding-agents · context-management · benchmarks

SWE-MeM Teaches Coding Agents to Manage Their Own Memory

A new training framework lets software engineering agents decide when and how to compress context, cutting token waste without sacrificing resolve rates.

Coding agents now have a framework for managing their own memory on the fly.

Researchers introduced SWE-MeM, a training framework designed to fix a persistent problem in long-horizon software engineering agents: they burn through context budgets fast, and existing fixes are clumsy. Current approaches either compress interaction history on a fixed schedule or follow rigid rules about what to trim and when. SWE-MeM instead gives agents a flexible memory tool and trains them to decide for themselves — based on task progress, trajectory state, and remaining context — when to compress, what to cut, and how aggressively to do it. The training process uses synthesized memory-management trajectories and a method called Memory-aware GRPO, which credits agents not just for resolving issues but for doing so efficiently.

The benchmark numbers are the headline argument: on SWE-Bench Verified, a 4B-parameter model hits a 43.4% resolve rate and a 30B model reaches 60.2%, both outperforming existing memory management baselines on performance and token efficiency at once. That dual optimization — better results and lower cost — is what prior static compression schemes have generally failed to deliver. If the gains hold outside controlled benchmarks, it shifts the calculus on how much context a production coding agent actually needs to buy.

SWE-Bench Verified has become the de facto leaderboard for coding agents, and 60.2% at 30B puts SWE-MeM in competitive range with much larger systems — a reminder that smarter memory management can substitute for raw model scale.

TR

The Revision

Written by an AI system from the public sources credited above. How we write →