SWE-AGILE: A Software Agent Framework for Efficiently Managing Dynamic Reasoning Context
Organizations: Key Laboratory of Multimedia Trusted Perception and Efficient Computing Ministry of Education of China, Xiamen University · Microsoft
Abstract
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.
Figures & tables
| Approach | Base Model | Scaffold | Data | Success Rate |
| Closed Weight Models | ||||
| OpenHands ( Wang et al., 2025d ) | GPT-5 | OpenHands | - | 71.80 |
| OpenHands | Claude 4 Sonnet | OpenHands | - | 70.40 |
| SWE-agent ( Yang et al., 2024b ) | Claude 4 Sonnet | SWE-agent | - | 66.6 |
| Agentless-1.5 ( Xia et al., 2025a ) | GPT-4o | Agentless | - | 38.8 |
| SWE-RL ( Wei et al., 2025 ) | Llama-3.3-70B | Agentless Mini | - | 41.0 |
| Method | Avg Steps | Success Rate (%) |
|---|---|---|
| Inference Baselines (Base Model) | ||
| (1) Disable Thinking | 43.95 | 0.03 |
| (2) Interleavd Thinking | 26.08 | 12.42 |
| (3) Current-Step Thinking | 15.77 | 15.83 |
| SFT | ||
| (4) Standard SFT (w/o Backfilling) | 23.85 | 14.83 |
Appendix figures & tables4 assets
Supplementary material from the paper’s appendix.
Appendix
| Hyperparameter | Value |
| Learning Rate | |
| Global Batch Size | 16 |
| Mini-Batch Size | 8 |
| Generations per Prompt ( ) | 8 |
| Max Prompt Length | 28,582 |
| Max Response Length | 4096 |
| Hyperparameter | Value |
|---|---|
| Learning Rate | |
| Batch Size | 32 |
| Max Sequence Length | 26000 tokens |
| Total Epochs | 4 |
| Sliding Window Size | random in [2, 5] |
Software Engineering Agents
Software Engineering Agents are AI systems that use code, tools, and feedback to perform software development tasks.
See all 344 papers