SpecForge: Recursive Self-Improvement for Coding Agents via Behavioral Specifications
On the map: LLM agents and tool use → Software engineering coding agents
also in 1 more
Abstract (arXiv)
Coding agents based on frozen language models can improve their performance by refining the external context they rely on, without updating model weights. We study recursive self-improvement through behavioral specifications: natural-language code documentation that describes the behavior of program entities and guides agents in generating correct code. We formulate a self-improvement loop in which an agent generates code from its current specifications, evaluates it with execution-verified tests, and refines the specifications based on observed failures. The improved specifications then guide subsequent generation, progressively improving the agent's understanding of the codebase. However, recursive refinement is challenging because program entities are interdependent. Improving the specification of one entity can inadvertently degrade the correctness of others, a phenomenon we call output coupling. This creates a whack-a-mole effect in which local improvements cause regressions elsewhere, preventing consistent progress. We introduce SpecForge, a multi-frontier tree search framework that addresses this challenge with three mechanisms: (i) Pareto-guided state selection preserves complementary specification states and prevents premature commitment; (ii) dependency-constrained entity selection prioritizes callee-before-caller refinement; and (iii) error-diversified expansion explores multiple refinements using different subsets of test failures. On DevEval+, SpecForge achieves the best performance across five backbone models, including a 94.9% solve rate with Claude-4.5-Sonnet and a 5.7-percentage-point average improvement over the strongest baseline. The improved specifications also make the agent better at tasks outside the loop: they transfer to cross-language translation and to new-feature implementation, where they outperform the benchmark-provided requirement documents.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use. Builds on 48 of its 63 references that are in the map. First posted on arXiv 11 Oct 2026.
Builds on
48 of 63 references.
Closest ancestors · 3
Same direction, newest first
- 2026GameDevBench: Evaluating Agentic Capabilities Through Game Development11 Feb
- 2025DocAgent: A Multi-Agent System for Automated Code Documentation Generation11 Apr
- 2024SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering6 May
Other references · 45
- 2023Reflexion: Language Agents with Verbal Reinforcement Learningcited by 4,276
- 2023Self-Refine: Iterative Refinement with Self-Feedbackcited by 3,442
- 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,373
- 2022Constitutional AI: Harmlessness from AI Feedbackcited by 3,050
- 2022Self-Instruct: Aligning Language Models with Self-Generated Instructionscited by 2,724
- 2023Voyager: An Open-Ended Embodied Agent with Large Language Modelscited by 2,191
- 2023Teaching Large Language Models to Self-Debugcited by 988
- 2023Large Language Models as Optimizerscited by 864
- 2023Large Language Models Can Be Easily Distracted by Irrelevant Contextcited by 841
- 2024Self-Rewarding Language Modelscited by 681
- 2023Eureka: Human-Level Reward Design via Coding Large Language Modelscited by 571
- 2023Promptbreeder: Self-Referential Self-Improvement Via Prompt Evolutioncited by 551
33 more
- 2025GEPA: Reflective Prompt Evolution Can Outperform Reinforcement Learningcited by 542
- 2024Automated Design of Agentic Systemscited by 407
- 2025Agentic Context Engineering: Evolving Contexts for Self-Improving Language Modelscited by 398
- 2022CodeT: Code Generation with Generated Testscited by 384
- 2023RepoCoder: Repository-Level Code Completion Through Iterative Retrieval and Generationcited by 367
- 2022CodeRL: Mastering Code Generation through Pretrained Models and Deep Reinforcement Learningcited by 358
- 2025Darwin Godel Machine: Open-Ended Evolution of Self-Improving Agentscited by 356
- 2024Optimizing Instructions and Demonstrations for Multi-Stage Language Model Programscited by 291
- 2025TTRL: Test-Time Reinforcement Learningcited by 275
- 2024TextGrad: Automatic "Differentiation" via Textcited by 273
- 2020Unsupervised Translation of Programming Languagescited by 263
- 2024WebRL: Training LLM Web Agents via Self-Evolving Online Curriculum Reinforcement Learningcited by 256
- 2023Self-Taught Optimizer (STOP): Recursively Self-Improving Code Generationcited by 148
- 2024SceneCraft: An LLM Agent for Synthesizing 3D Scene as Blender Codecited by 134
- 2020A Transformer-based Approach for Source Code Summarizationcited by 133
- 2025Self-Adapting Language Modelscited by 84
- 2022Language Models Can Teach Themselves to Program Bettercited by 78
- 2024RepoAgent: An LLM-Powered Open-Source Framework for Repository-level Code Documentation Generationcited by 70
- 2024Trace is the Next AutoDiff: Generative Optimization with Rich Feedback, Execution Traces, and LLMscited by 69
- 2024Prompting Large Language Models to Tackle the Full Software Development Lifecycle: A Case Studycited by 44
- 2024ComposerX: Multi-Agent Symbolic Music Composition with LLMscited by 42
- 2024PromptWizard: Task-Aware Prompt Optimization Frameworkcited by 36
- 2024Large Language Models as Test Case Generators: Performance Evaluation and Enhancementcited by 28
- 2025Code2Video: A Code-centric Paradigm for Educational Video Generationcited by 27
- 2025TheoremExplainAgent: Towards Video-based Multimodal Explanations for LLM Theorem Understandingcited by 24
- 2024On the Noise Robustness of In-Context Learning for Text Generationcited by 16
- 2025SWE-Dev: Evaluating and Training Autonomous Feature-Driven Software Developmentcited by 16
- 2024CTINexus: Automatic Cyber Threat Intelligence Knowledge Graph Construction Using Large Language Modelscited by 14
- 2023Hue: A User-Adaptive Parser for Hybrid Logscited by 5
- 2026NL2LOGIC: AST-Guided Translation of Natural Language into First-Order Logic with Large Language Modelscited by 5
- 2025Retrieval-Augmented Generation as Noisy In-Context Learning: A Unified Theory and Risk Boundscited by 4
- 2025CTIConnect: A Benchmark for Retrieval-Augmented LLMs over Heterogeneous Cyber Threat Intelligencecited by 4
- 2026CTIFoundry: An Agent-Native Corpus Scaffold for Cyber Threat Intelligencecited by 2
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026Drafting Agents, Not Just Tokens: Speculative Recursive Self-Improvement for Agentic Systems
- 2026Self Improvement via Fast Tree-search
- 2026RSIGym: A Flexible Environment for Recursive Self-Improvement
- 2026Latent Programming Horizons in Coding Agents
- 2026Self-Evolving Coding Agents
- 2026ModularRSI: Modular and Generalizable Recursive Harness Self-Improvement
- 2026TRIM: Reducing AI-Generated CodeSlop via Agent Trajectory Minimization
- 2024CodeTree: Agent-guided Tree Search for Code Generation with Large Language Models