🤖 AI Summary
This work addresses the high computational and API invocation costs associated with large language model (LLM)-driven software engineering agents. To mitigate this, the authors propose a novel early termination mechanism grounded in structured historical experience, which— for the first time—leverages insights extracted from past repair tasks to dynamically determine when to halt iterative code generation. This approach significantly reduces resource consumption while maintaining task completion rates with negligible performance degradation (≤0.2% loss). Experimental evaluation on SWE-bench Verified demonstrates that the method achieves an average 32% reduction in total cost—up to 55% in the best case—alongside a 21% decrease in API calls, 30% fewer input tokens, and 25% fewer output tokens.
📝 Abstract
Software engineering (SE) agents powered by large language models are increasingly adopted in practice, yet they often incur substantial monetary cost. We introduce EET, an experience-driven early termination approach that reduces the cost of SE agents while preserving task performance. EET extracts structured experience from prior issue-resolution executions and leverages it to guide early termination during patch generation and selection, reducing unproductive iterations. We evaluate EET on the SWE-bench Verified benchmark across three representative SE agents. EET consistently reduces total cost by 19%-55% (32% on average), with negligible loss in resolution rate (at most 0.2%). These efficiency gains are achieved, on average, by identifying early-termination opportunities for 11% of issues and reducing API calls, input tokens, and output tokens by 21%, 30%, and 25%, respectively. We release the code, prompts, and data at https://github.com/EffiSEAgent/EET.