Prior representative ReAct-style approaches in autonomous Software Engineering (SWE) typically lack the explicit System-2 reasoning required for deep analysis and handling complex edge cases. While recent reasoning models demonstrate the potential of extended Chain-of-Thought (CoT), applying them to the multi-turn SWE task creates a fundamental dilemma: retaining full reasoning history leads to context explosion and ``Lost-in-the-Middle'' degradation, while discarding it would force the agent to redundantly re-reason at every step. To address these challenges, we propose SWE-AGILE, a novel software agent framework designed to bridge the gap between reasoning depth, efficiency, and context constraints. SWE-AGILE introduces a Dynamic Reasoning Context strategy, maintaining a ``sliding window'' of detailed reasoning for immediate continuity to prevent redundant re-analyzing, while compressing historical reasoning content into concise Reasoning Digests. Empirically, SWE-AGILE sets a new standard for 7B-8B models on SWE-Bench-Verified using only 2.2k trajectories and 896 tasks. Code is available at https://github.com/KDEGroup/SWE-AGILE.
翻译:在自主软件工程(SWE)领域,现有的典型ReAct风格方法通常缺乏深层分析与处理复杂边界情况所需的显式System-2推理。尽管近期推理模型展示了扩展思维链(CoT)的潜力,但将其应用于多轮SWE任务会产生根本性困境:保留完整推理历史会导致上下文爆炸和“中间迷失”退化,而丢弃历史则会迫使智能体在每一步重复冗余推理。为解决上述挑战,我们提出SWE-AGILE——一种新颖的软件智能体框架,旨在弥合推理深度、效率与上下文约束之间的鸿沟。SWE-AGILE引入动态推理上下文策略,通过维护详细推理的“滑动窗口”保证即时连续性,避免重复分析,同时将历史推理内容压缩为简洁的推理摘要。实验表明,SWE-AGILE仅使用2.2k条轨迹和896个任务,就在SWE-Bench-Verified上为7B-8B模型树立了新标杆。代码已开源:https://github.com/KDEGroup/SWE-AGILE