NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

A Self-Improving Coding Agent

Maxime Robeyns, Martin Szummer, Laurence Aitchison

TL;DR

The authors introduce SICA (Self-Improving Coding Agent), an LLM-based agent system capable of reading, modifying, and executing its own Python codebase to optimize its speed, cost, and benchmark accuracy. Unlike prior meta-agent approaches that separate the "optimizer" from the "worker," SICA is fully self-referential, autonomously boosting its performance on a SWE-bench Verified subset from 17% to 53%.

What Problem Does This Paper Address?

Building high-performing LLM agents today requires massive engineering effort—manually designing prompts, toolsets, context caching schemes, and multi-agent hierarchies. While recent meta-learning frameworks like ADAS automate prompt/orchestrator optimization, they typically maintain a rigid split: a static meta-agent optimizes a narrow, domain-specific script used by a separate target agent.

This paper asks: Can an autonomous coding agent act as its own software engineer—evaluating its own historical performance, identifying architectural bottlenecks, and rewriting its own full Python codebase to become a better agent?

Methods

SICA achieves recursive self-improvement through a closed meta-improvement loop and modular multi-agent scaffolding:

  • The Self-Referential Archive Loop: SICA tracks past agent codebases and their benchmark results in an archive. At each iteration $i$, SICA computes a utility score balancing accuracy ($w_{\text{score}}=0.5$), cost ($w_{\text{cost}}=0.25$), and wall-clock execution time ($w_{\text{time}}=0.25$). The highest-utility agent is selected as the next meta-agent to inspect the archive, diagnose weaknesses, write code modifications, run tests, and emit agent iteration $A_{i+1}$.
  • Standard Python Implementation: Unlike systems relying on domain-specific languages (DSLs) or restricted logic-tweak tools, SICA operates directly over its full standard Python repository using shell commands, file edits, and git.
  • Hierarchical Sub-Agents: SICA delegates tasks across modular sub-agents—an archive explorer (diagnoses past failure modes), a software developer (implements features and tests), a problem solver, and a dedicated reasoning agent (powered by OpenAI’s o3-mini, while primary orchestration uses Claude 3.5 Sonnet).
  • Asynchronous Overseer & XML Tool Calling: A concurrent, background LLM overseer monitors execution traces and system callgraphs to detect pathological loops or stalled sub-agents, intervening with steer notifications or forced terminations. Communication uses XML-formatted tool calls with closing-tag stop tokens to handle raw source code strings without JSON-escaping overhead.
       ┌────────────────────────────────────────────────────────┐
       │                                                        │
       ▼                                                        │
[Select Best Agent] ──> [Archive Analysis] ──> [Self-Code Edit] ─┘
  (via Utility Score)     (Find Weaknesses)      (Tests & Deploys)

Datasets

The authors evaluate the self-improvement loop across software engineering, synthetic code tasks, and pure reasoning benchmarks:

  • SWE-bench Verified: A fixed random sample of 50 real-world GitHub issues testing multi-file navigation, planning, and patch generation.
  • LiveCodeBench: 50 random problems representing competitive programming challenges.
  • Synthetic File Editing Benchmark (New): Built from consecutive SWE-bench git commits to test minimal diff/patch editing without wholesale file overwrites.
  • Synthetic Symbol Navigation Benchmark (New): Evaluates codebase navigation by requiring the agent to identify exact file:line:col definition sites of specific symbols in cloned Python repositories.
  • Reasoning Benchmarks: AIME 2024 and GPQA Diamond, evaluating mathematical and graduate-level scientific QA.

Key Insights and Ideas

  • Emergence of Real Engineering Tooling: Starting with only raw file overwrite and bash execution tools, the agent spontaneously invented and integrated practical developer tools across 15 iterations. These included an intelligent diff-based patch editor (SmartEditor), an AST-based Python symbol navigator, and ripgrep-powered context summarizers.
  • Scaffolding vs. Base Reasoning Tradeoff: While SICA drove dramatic gains on long-horizon software engineering tasks, it provided negligible gains on pure reasoning benchmarks (AIME/GPQA hovered around 76%). The authors note that when base models already exhibit deep internal chain-of-thought (e.g., o3-mini), complex external scaffolding can disrupt their internal reasoning flow rather than help it.
  • Cost and Latency Co-Optimization: Because execution time and dollar spend were baked into the selection utility, the agent did not simply brute-force problems with more tokens. It actively engineered KV-cache-friendly context management and file-size thresholding.

Key Results

  • SWE-bench Verified: Problem resolution accuracy rose from 17% (iteration 0) to 53% (iteration 14).
  • Efficiency Gains: Average time spent per benchmark problem decreased from 130.2 seconds to 114.5 seconds, while average cost remained stable (~$1.70 to $2.20 per problem) despite solving far more complex issues.
  • Synthetic Benchmarks: File editing accuracy improved from 82% to 91% (peaking at 96%), and LiveCodeBench rose from 65% to 71%.
  • Reasoning Plateau: On AIME 2024 and GPQA Diamond, utility saturated immediately; the agent system scored ~76% overall, underperforming standalone o3-mini-high (87% on AIME, 79% on GPQA).

Limitations and Future Work

  • Scaffolding Only (No Weight Updates): SICA modifies its orchestrator, prompt definitions, and tool scripts, but cannot update the underlying neural network weights.
  • Model Saturation: Complex multi-agent scaffolding offers diminishing returns for single-turn, heavily internalized reasoning tasks. Joint training of foundation models alongside their scaffolding remains an open problem.
  • Safety & Alignment in Recursive Loops: As agents gain autonomous self-modification capabilities, safety guarantees become paramount. While the paper uses an asynchronous LLM overseer and human-in-the-loop web observability, the authors emphasize that if weight updates were incorporated, observability alone would be insufficient to catch deceptive or steganographic behaviors.

Summary updated

BibTeX
@inproceedings{robeyns2025self,
  author = {Maxime Robeyns and Martin Szummer and Laurence Aitchison},
  title = {{A Self-Improving Coding Agent}},
  booktitle = {SSI-FM @ ICLR},
  year = {2025},
  url = {https://openreview.net/forum?id=rShJCyLsOr},
}
Figure