Huxley-G\"odel Machine: Human-Level Coding Agent Development by an Approximation of the Optimal Self-Improving Machine
Authors: Wenyi Wang
Piotr Piękos
Li Nanbo
Firas Laakom
Yimeng Chen
Mateusz Ostaszewski
Mingchen Zhuge
Jürgen Schmidhuber
Venue: ICLR 2026 Oral (2026)
Keywords: Self-Improvement
Coding Agents
G\"odel Machine
Primary area: transfer learning, meta learning, and lifelong learning
TL;DR: We propose Huxley-G\"odel Machine, an algorithm guideing self-improvements following an estimation of the value function of G\"odel Machines.

Abstract: Recent studies operationalize self-improvement through coding agents that edit their own codebases. They grow a tree of self-modifications through expansion strategies that favor higher software engineering benchmark performance, assuming that this implies more promising subsequent self-modifications. However, we identify a mismatch between the agent’s self-improvement potential (metaproductivity) and its coding benchmark performance, namely the Metaproductivity-Performance~Mismatch. Inspired by Huxley’s concept of clade, we propose a metric ($\mathrm{CMP}$) that aggregates the benchmark performances of the descendants of an agent as an indicator of its potential for self-improvement. We show that, in our self-improving coding agent development setting, access to the true CMP is sufficient to simulate how the Gödel Machine would behave under certain assumptions. We introduce the Huxley-G\"odel Machine (HGM), which, by estimating $\mathrm{CMP}$ and using it as guidance, searches the tree of self-modifications. On SWE-bench Verified and Polyglot, HGM outperforms prior self-improving coding agent development methods while using fewer allocated CPU hours. Last but not least, HGM demonstrates strong transfer to other coding datasets and LLMs. %large language models. 
The agent optimized by HGM on SWE-bench Verified with GPT-5 mini and evaluated on SWE-bench Lite with GPT-5 achieves human-level performance, matching the best officially checked results of human-engineered coding agents. Our code is publicly available at https://github.com/metauto-ai/HGM.

Published as a conference paper at ICLR 2026
HUXLEY-GÖDEL MACHINE: HUMAN-LEVEL CODING AGENT DEVELOPMENT BY AN APPROXIMATION OF THE OPTIMAL SELF-IMPROVING MACHINE
Wenyi Wang" Piotr Piçkos" Nanbo Firas Laakom Yimeng Chen Mateusz Ostaszewski Mingchen Zhuge
Jürgen Schmidhuber
(wenyi. wang, piotr.piekos nanbo. li, firas. Laakon, y yimeng.
chen,
mateusz. estaszewski, mingehen. zhuge, juergen. schmidhuber | ikaust.edi. King Abdullah University of Science and Technology (KAUST)
Thuwal, Saudi Arabia
ABSTRACT
Recent studies operationalize self-improvement through coding agents that edit their own codebases. They grow a tree of self-modifications through expansion strategies that favor higher software engineering benchmark performance, assum- ing that this implies more promising subsequent self-modifications. However, we identify a mismatch between the agent's ' self-improvement potential (metapro- ductivity) and its coding benchmark performance, namely the Metaproducttivit- Performance Mismatch. Inspired by Huxley's ' concept of clade, we propose a metric (CMP) that aggregates the benchmark performances of the descendants of an agent as an indicator of potential for seff-improvement. We show that, our self-improving coding agent development setting, access to the true CMP is suf- ficient to simulate how the Gödel Machine would behave under certain assump- tions. We introduce the Huxley-Gödd Machine (HGM), which, by estimating CMP and using as guidance, searches the tree of seff-modifications. On SWE- bench Verified and Polyglot, HGM outperforms prior self-improving coding agent development methods while using fewer allocated CPU hours. Last but not least, HGM demonstrates strong transfer other coding datasets and LLMs. The agent optimized by HGM on SWE-bench Verified with GPT-5 mini and evaluated on SWE-bench Lite with GPT-5 achieves human-level performance, matching the best officially checked results of human-engineered coding agents. Our code is publicly available at https: pempps:/giiee //tgt//gttttb//tt www/metaauliecccoommmmmcc -aittttaaaiGGMM
HGM (Ours)
DGM
SICA
1.0
60.3
Correlation with Metaproductivity
0.78
Best- Best-found forffoondd accuracy (%)
56.67%
*
35.0
53.33%
50%
0.44
50.0
0.38
$7.5
0.28
0.27
42.5
SWE -WE-bbech Verified
Polyglot
200
400
600
800
1000
1200
Allocated CPU-Hours
Figure 1: (Left) Weak correlation between the guidance metrics of other methods (based on perfor- mance) and long-term self improvement; HGM mitigates this mismatch by leveraging clade-level metaproductivity. (Right) On SWE-bench Verified, HGM achieves higher accuracy with 2.38 times less allocated CPU-hours. SICA encountered repeated errors after consuming 45% of its budget.
"qqual contribution

---

Published as a conference paper at ICLR 2026
INTRODUCTION
Processes of self modificaaiioonnnoo drive the growth of complex systems, from biological evolution (Hen-
drikse et al.] 2007;; Dawkins 2019) to cultural and scientific innovation (Good, 1966; Hall 2007]. These general ideas have been instantiated in concrete algorithms for self-improving agents (Schmidhuber, 1987, 2003 Nivel et al. 2013 Everitt et al. (0T6), demonstrating how ab- stract principles of melf-modiicatiio can be translated into operational mechanisms. Unlike static systems constrained by fixed architectures, such agents incrementally modify their own self- modification mechanisms and learning strategies, reusing newly gained abilities to fuel subsequent improvements. This capacity fosters continual adaptation, reduces reliance on human intervention, and enables solvingg capabilities that cannot be fully anticipated at design time.
A central challenge is how to decide which self-modification to accept. The Gödel ma- chine (Schmidhuber) 2003) (GM) offers a theoretically optimal answer: accept only modifications that provably increase the expected long-term utility. While this provides sound blueprint, its liance on formal proofs makes practically challenging. Recent implementations instead rely on coding agents that edit their own codebases and favor self-modifications from agents with higher benchmark performance (Robeyns et al. 2025: Zhang et al. (025a). Yet, as illustrated in Figure I| (left), this heuristic can be misleading:
high-scoring agent may produce unproductive descen- dants, while a lower-scoring one seeds lineages that achieve greater long-term gains. We term this phenomenon the citlpproduuctiiitt-eefoorma
Mismatch.
To address this mismatch, we introduce clade-level metaproductivity (CMP), inspired by Huxley's notion of clades as lineages of common ancestry (Huxley) [957). A clade is group of organisms that includes a common ancestor and all of its descendants; for example, mammals form a clade, and primates form a clade within mammals. CMP quantifies the productivity of a clade by aggregating the success of an agent's 's descendants rather than relying solely on its immediate benchmark score. Furthermore, we show in Theorem | that in our self- improviig coding agent development setting (Assumption[] [ which includes the assumption that the only quality of the self self-improvement process is the evaluation score of the final agent and that the evaluation is conducted with repeatable trials), having access to the true CMP oracle suffices imitate the Gödel Machine.
This insight motivates our proposed algorithm, the Huxley-Gddel Machine (HGM), which ap- proximates GM-style self-improvement by estimating CMP from clade-aggregated descendant out- comes and selecting nodes to expand via Thompson sampling [Thompson] 1933). Furthermore, by leveraging more reliable estimate, we adaptively decouple expansion from evaluation, leading to asynchronous execution for efficient parallelism.
Empirically, HGM better aligns with long-run agent productivity than benchmark-drivee base- lines. as shown in Figure [ (left). On SWE-bench Verified (Jimenez et al.) [024 Chowdhury al. 2024) and Polyglot (Gauthier) 2024), HGM consistently outperforms Darwin Gödel Machine (DGM) (Zhang et al. (025a) and Seff-Improving Coding Agent (SICA) (Robeyns et al. 2025) ). Re- markably, one agent found by HGM surpasses SWE-agent (Yang et al. 2024), the highest-scoring human-engineered coding agent with officially checked results, on SWE-bench Lite (Jimenez al. 2024], when both use the GPT-5 mini backbone under matched budgets. The dis--visovered agent transfers robustly when evaluated under shift that is simultaneous in both the dataset and the model. Although optimized on SWE-bench Verified with GPT-5 mini, when tested on SWE-bench Lite with the GPT-5 backbone, it achieves performance on par with the best officially verified human-engineered coding agents.
To summarize, our contributions are as follows:
We analytically define the Clade-Metarroduuctiviyyy (CMP) function as a measure of agents' self- improving ability and show that in self-improving coding agent development setting (Assump- [i access to a CMP oracle suffices to reproduce the Gödel Machine's acceptance mechanism. (Theorem l].
We empirically observe that immediate benchmark performance is an unreliable predictor of CMP and show that our CMP estimator aligns better.
Using our CMP estimator, we propose the Huxley-Gddel Machine (HGM), which approximates the Gödel Machine in a coding agent setting from partial evaluations and guides the expansion via Thompson sampling with adaptive scheduling.
2

---

Published as a conference paper at ICLR 2026
We empirically validate HGM on SWE-bench Verified and Polyglot, demonstrating higher-quality optimized agents compared to previous selfoiiig methods, even though they were discov- ered within substantially smaller allocated CPU-hours. Furthermore, HGM achieves human-level coding agent design on SWE--hnnch I Lite by optimizing on SWE-bench Verified.
2 SELF-IMPROVING AS TREE-SEARCH
Both the Darwin Gödel Machine (DGM) and the Self-Improving Coding Agent (SICA) belong to the class of self-referential AI (Schmidhuber 1987 2006), wherein a single agent modifies itself to generate new agents, each empirically validated on downstream tasks. In this paper, we formalize this self-improve celf-improvement process as an iterative tree-search problem, where the goal is to discover an agent that maximizes performance across multiple downstream tasks. Coneretely, starting from an initial agent as the root, a tree-search policy incrementally grows the tree of self-modife modifeede agents. At each iteration, the policy either selects an agent (a node the tree) to expand by producing a child agent (a self- elf-modified version of the selected agent) or selects an agent to undergo additional evaluation on downstream tasks.
Formally, let Ti denote the archive of our agents at iteration L. In this paper, the archive is always represented as a tree of evolved agents, and we use the terms archives and trees interchangeably. To {ao} is initialized as single-node tree with a fixed initial agent. At iteration t, the policy selects actions a++1 ~ ([( Te), where π is a policy over actions A, = M,UV,, where M₁ = {m, : E T are evaluations. Here, ma instructs agent to produce a meff-modification that is added as a child to the tree, while va selects an agent from the tree for an additional evaluation on one more downstream task. After exhausting the computational budget, the policy selects final agent (Afinal = arg max Score, (a) TT where T is the termination iteration and Score is part of the policy) from the final tree the returned agent. The objective is to optimize ( E(U(amaa)) where U is utility function that measures downstream tasks performance. In this work, we define U the average of binary success indicators across all downstream tasks. π denotes an algorithm, with DGM, SICA, and our proposed HGM representing concrete instances.
E ) agent modifications and Vi (Ma=
Compound Policy. At each step of seff-imprrveement, the system faces a compound decision: whether to expand the tree by generating new agents or to evaluate existing ones. This decision nat- urally decomposes into three sub-policies: (i) a selection policy that chooses between expansion and evaluation, (ii expansion policy that determines which parent to modify, and (iii) evaluation policy that selects which agent to test. Prior approaches, such as SICA and DGM, conflate these choices. They always expand parent, create child, and immediately evaluate that child mul- tiple tasks. This fixed sequence restricts flexibility: once a new agent is generated, it monopolizes evaluations, even if older agents appear more promising. For instance, an agent that fails nine tasks in row continues to consume evaluations, while an older agent with partial successes is ignored.
HGM breaks this rigidity by decoupling expansion from evaluation. At each step, it adaptively decides whether to generate a new agent or to further probe an existing one, and evaluations are always the granularity of single agent-task pair. This finer control enables early stopping on unpromising agents. Table Aummarrzee how SICA, DGM, and HGM instantiate these sub-policies.
HUXLEY- GÖDEL MACHINE
The original Gödel Machine is general task solver that can, in principle, optimally perform any provable seff-improvements in a computable environment with respect to a given objective (Schmid-) huber 2003). It operates by running proof searcher that continually seeks formal proofs that mod- ifying its own code will increase expected utility; once such proof is found, the modification is executed and permanently changes the machine (or program). Crucially, the theoretical analysis accounts for the single-life setting (no repeatable trials) and the real cost of proof search in time and resources that could otherwise be spent collecting reward. In contrast, this paper considers a setting tailored to self-in infroviipoiin coding agent development under Assumption [ where the objective is solely the utility of the final agent selected at the end of development, evaluations are conducted in repeatable test environment reset between trials, each self-modification reduces the remaining
3

---

Published as a conference paper at ICLR 2026
time budget by exactly one unit, and the only operation incurring time cost is the safffoodifiatioon itself. Within this framework, the Gödel Machine can be viewed as an optimal agent operating in POMDP in which the policy observes only the parent Gporent the child Achild and the remaining budget b, chooses whether to accept or reject the child, and at termination Score, selects either the final parent or child as output; full POMDP specification is provided in Appendix A
Assumption 1. For the theoretical analysis of Gödel Machine applied to relf-improving coding agents, we make the following additional assumptions in comparison to the setup from the original Gödel Machine:
The policy objective function is defined as function of only the final agent, with no other rewards received before termination;
The agent's 's ulility is measured by its performance on evaluation tasks, under the as- sumption of repeatable trials: for any agent-task pair, the expected oulcome is inde- pendent of evaluation time or prior events.
The proofs of Güdel Machines do not consume budget;
And each self-modification costs exactly one unit of the budget.
Since formal proof search of self improveeeesstssss can be intractable, in this section, we introduce the Hlxlley-Göde Machine (HGM), a self-improving machine that approximates Gödel Machine by using clade-level statistics. At the core of HGM is metaproductivity, a measure of agents' ability to improve their self-improvement skills that lead to downstream performance distant future agents.
In Section we introduce two metrics of metaproductivity: Global metaproductivity (GMP), which captures how evolving given agent increases the metaproductivity of the entire tree of agents. This measure of metaproductivity is general and hard to operationalize instead introduce mettpoodaapro (CMP) that measures only how promising evolutions start- ing from given agent (its clade) are. In Theorem [ we show that access to true CMP is sufficient to implement a Gödel Machine applied to the coding agent development setting (Assumption [T. Following on that, in Section 3.2 introduce the Huxley--Göde Machine (HGM), that guides the self-improvement search with Thompson Sampling based on the estimate of CMP.
estimate. We
3.1 METAPRODUCTIVVTY AND CLADE-METAPRODUCCIITT
Given policy n, quantify the quality of how agent's self- modifiiiiitt influences the perfor- mance of the system, we define the notion of global metaproductivity (GMP):
GMP+(T, (TT (argmax, Score, [
where T is a tree of agents and E T. Scorez is the function that scores the agents for the final selection. The policy и unrolls the trajectory until the end of the episode with policy and produces a final archive of agents Tg. The distribution of the trajectory is given by Pr
GMP directly corresponds the Q-value function in reinforcement learning, with state phrased as the archive of agents, and action being the selected agent to expand. The GMP value of node mea- sures how good (on average) the final agent obtained from the search process will perform. GMP measures the long-temn terg-termmmme potential of self-imprrvemeets, which also includes modifications that im- prove self-imm inff-ipproveeettt itself and so on. An algorithm might, at the beginning, focus on improving the ability to self-improve while neglecting direct benchmark abilities, only to later focus on them. This is a principal meta-learning behavior that captured the original Gödel Machine (Schmid- huber 2003). The objective of designing a policy for self- ceff-improvement (Section 2 is equivalent to optimizing GMP((ao), ag).
While GMP captures the full long-term potential of policy, its scope is overly broad for practical conceptualization. Notably, the Gödel Machine considers only the outcomes of the current agent and its descendants when deciding whether to accept modification. Motivated by this observation, we define a localized variant GMP that focuses on the subtree rooted at a given agent, ie.. its clade. We refer to this quantity Chade-Metarooducctvvit (CMP):
4

---

Published as a conference paper at ICLR 2026
CMP a (T, E (T7,))
(argmax
= -T (a17aa)
ec(T. (a')
(if Scl=U,,
where C(TB, a) is the clade (i.e., the subtree with as the root) of the node a in the Tree Ts and Score the final agent selection metric.
CMP contains the non-greedy information about the future evolution of self-improving agents, therefore guiding good strategies for self-improvement aimed also at the improvement of the self- improvement itself. Furthermore, we show the crucial relation of CMP to the Gödel Machine.
Theorem 1. Under Assumption 7 access the CMP oracle is sufficient implement the Gödel Machine.
The proof is available in the App. A This observation motivates to introduce the estimate of CMP and use this as guidance in our algorithm. An algorithm with a perfect estimate CMP would be able produce the Gödel Machine. HGM by estimating CMP approximates the original Gödel Machine. We describe our algorithm fully in the next section.
3.2 ALGORITHM
Existing methods use benchmark performance coding tasks guidance metric, treating task success as an indicator self-improvement potential. This assumption overly greedy: evalu- ates only the immediate utility of a modification while ignoring its downstream consequences for future self-moiifiattins. We refer to this gap as the Metaproductiivtyy Perrovivity--Pffoomnnneee Mismatch: the divergence between short-term task performance and the long-term capacity for self-improvement as measured by CMP.P Empirical evidence shows that this mismatch happens in practice (see Sec- tion 4.1 We aim to model long-term, global dependencies by deriving our estimator of CMP. Specifically, we define HGM by stating its three subpolicies.
Expansion Policy The core of the HGM algorithm is its selection criterion for expansion. HGM aims to estimate Clade Glade-Metarroductivit with the motivation that the true CMP as the criterion would produce the Gödel-Machine due to Theorem [ In this sense, HGM approximates Gödel- Machine, the optimal self-improving machine. This is in contrast to the currently used greedy selection criteria based on performance metries, which ignore the potential of the model to improve self-improving abilities.
We estimate CMP with the weighted average of agents' empirical performance in the clade, (See below for how our evaluation policy promotes more accurate estimation of CMP.) Formally, let us assume fixed archive of agents Tú, Muscesss (a) be the number of passed tests of a, and (a)ilure(a be
the number of failed tests of a. Then
success
(a)
Σ
Nauccess (a') and Taiture (a)
Tifaiture (a').
a'EC(a)
of e'EC(a)
Where C(a) is the clade of a in Tr. We define Clade-Metarroduccivity estimator as
ne Sapposss (a)
CMP(a)= =
T2. successs (a) + T (a))
Evaluating productivity at the level of entire clades rather than individual agents offers several key advantages. It aligns better with the goal of self improvement, highly valuable if its descendants consistently advance, while stagnant lineages are deprioritized. At the same time, aggregating evidence across clade yields more statistically robust estimates than single-node outcomes by using information from more samples. This is particularly important when evaluations are costly and benchmarks are only partially observed.
modest ancestor can still be
CMP (a) can be viewed as a weighted sum over empirical means of agents in C(a), with the weight for agent being the number of task evaluations it has. Furthermone, design evaluation
5

---

Published as a conference paper at ICLR 2026
selection in such way that it selects highly performing agents, which creates a selection of a soft maximum in the clade.
After calculating the CMP estimates, the HGM probabilistically approximates the selection of the highest scoring agent with Thompson Sampling a standard method in the bandit literature for smoothly maximizing the decision criterion (Agrawal & Goyal 2012 Chapelle & Li 2011 Lat- timore et al. 2020). We will refer to a ~ [s, n2 E Te as the agent sampled from the Chompson-Sampllee process with parameters ne (number of successes) and ny (number of fail- ures). Given the fact that the search problem has a known budget, our algorithm introduces an suplorationeexplotttaiee scheduler which is monotonically increasing with respect to the current time t, encouraging exploration in the early stage and polarization of the sampling distribution when approaching the end. Formally, we select the agent to expand a* as
a" (1 + s (a)), r( + "raiuur (a E TT)).
As stated in the expansion policy, design our evaluation policy to priori- tize agents with a higher evaluation score to induce the selection of the maximum over the clade. Formally, the agent evaluate a" is sampled from the Thompson Sampling process with
Evaluation Policy
a' TS(((1 + nsuccess (a)), + (a)a
Selection Policy Finally, our agent has to choose between expansion and evaluation. At each iteration, the algorithm first selects whether to evaluate or expand. Previous methods have evaluated newly created agents directly after their creation. Our novel estimation of agent self-improving quality has additional benefit of collecting more samples faster (because it has samples from the entire clade). This enables a more tineggrinedd control over when to evaluate and when to create a new agent for better efficacy. Therefore, we decouple evaluation from expansion and treat them as separate steps.
To decide how and when evaluate expand agents, draw inspiration from the infinite-armed bandit literature. Infinite-armer bandit problems capture the tension between repeatedly sampling known options reduce uncertainty about promising arms and exploring new options that have the potential to perform better. This perspective provides natural lens for our setting, where evaluations correspond to sampling existing arms and expansions correspond introducing new ones. In this work, we follow the strategy of UCB-Air (Wang et al.) 2008), which adds arms when the number of evaluations No 2 m for some a E [0, I]. where m is the number of existing arms. In our case, arms correspond to the agents; hence, decide to expand at time t if N 2 [Tel
Final Agent Selection Strategy HGM iteratively executes the structured policy defined by our selection policy, expansion policy, and evaluation policy. When the computational budget exceeds, returns the agent with the highest percentile the utility posterior the final tree for some hyperparameter namely the best-belief agent. Formally, best-belief agent is defined as
argmax [1 (s)ccess(a); 1 Prailure (a)),
where / the regularized incomplete beta function. See Algorithn in Appendix B for the detailed procedure of HGM.
Asynchronous Implementation As an additional benefit of decoupling the policy, we introduce asynchronous execution of evaluation and expansion. Since the execution of coding agents generally requires querying large language models multiple times, the computation time can be lengthy. To boost our algorithm, we propose the asynchronous HGM algorithm (HGM Async), which utilizes all possible computational power until the computational budget is exceeded. HGM Asyne simul- taneously executes one iteration process iteration immediately starts. It uses the most recent data with one exception and updates the data once it finishes. The exception is that one needs to take all running expansions and explorations into consideration when executing the selection strategy. See experimental results 2 for run time comparison with DGM and SICA.
each available CPU. Once one iteration finishes, new
4 EXPERIMENTAL RESULTS
We evaluate HGM on challenging software engineering tasks to assess three core aspects: 1) the fi- delity of HGM's CMP estimation (Sec. 4.1) 2) its capability for self-improvement with HGM com-

---

Published as a conference paper at ICLR 2026
Table 1: Clade-Metaproducciitty: Empirical vs. Estimation Correlation. We report the Pearson correlations between the Verified-60 and Polyglot. For the weighted correlations, each prediction is weighted by its accessed number of evaluations.
empirical CMPs and the estimates from DGM, SICA, and HGM on SWE-
SWE-Veriffed-6l
Polyglot
Estimates
Weighted
Un-weighted
Weighted
Un-weighted
SICA
0.444
0.444
0.274
0.274
DGM
0.285
0.406
0.383
0.357
HGM (Ours)
0.778
0.512
0.626
0.873
pared with DGM and SICA (Sec. 4.2 and 3) the effectiveness in automatic agent design through evolutionary processes, benchmarked against a leading human design up to date (Sec. 4.3 We conducted our experiments on the SWE-bench Verified
(WE--ferffied) and SWE-bench Lite (SWE-
Lite) variants, and the Polyglot problems, both consisting of coding challenges and are widely used for coding agent evaluation (Xia al.) [025 Zhang et al. 2024 20256). We follow DGM's s evalu- ation setting of Polyglot problems, where agents have no access to private test cases as well as test results. For budget considerations, addition to the full datasets, we use 60-task subsets (SWE- Verified-60), derived from the first two stages of DGM's progressive evaluation. In all experiments, we employ HGM with an
scheduler H. where b is the remaining budget, == 1, and 0.6. All experiments involving HGM use the HGM-Async algorithm. We apply an identical initial agent when compared to DGM and SICA, which is adopted from the official implementation of DGM. See Appendix C.I for detailed description of the initial agents used in different experiments.
4.1 TWTTRRODDCCIIVIYYYPEPRRROO
MISMATCH
The experiments in this section are designed to serve two purposes: (i) to provide evidence of the Metaproduuttiitty-Perroe Perfottty-- Mismatch (MPM) issue; and (ii) to assess whether the CMP of HGM is a more reliable CMP estimator than the utility measures adopted by DGM and SICA. To reveal the mismatch inherent in such reliance, we compute the correlation between their predictions and empirical CMP. To obtain empirical CMPs, we analyze the expanded search tree after each method has completed its run. For every node in the tree, we define its empirical CMP as the maximum empirical mean of the task performance achieved within its clade with the root of this clade excluded. This construction ensures that empirical CMP captures the self-imprrvvemnn ability of a node. We exclude the root of clade to avoid circular use of the target in the estimators. For
HGM, the CMP is defined as a function over the clade of node; a critical adjustment is required to avoid target leakage. Specifically, we exclude the evaluations that are most directly related to the target: the root of the clade (an ancestor of the target) and the subtree rooted at a direct child of the evaluated node that contains the empirical maximum, thereby ensuring a fair comparison (see Appendix [ for detailed computation). We report both the correlation coefficient weighted by the number of evaluations used in prediction, as well as the unweighted correlation. We conducted our experiments on the Weifeeeii and Polyglot datasets.
Results & Discussion Table [ summarizes the correlations between the three estimators and the empirical CMPs (the targets). We first observe that the SICA and DGM estimators achieve positive Pearson correlation coefficients: 0.444 and 0.285 on SWE-Vess Verified-60, and 0.274 and 0.383 on Polyglot, respectively, suggesting weak aligmments, i.c., MPM. In comparison, HGM's estimator, CMP, achieves substantially stronger weighted correlations of 0.778 and 0.626 on SWE-Verified 60 and Polyglot, respectively, as well as 0.512 and 0.873 unweighted correlation, surpassing SICA and DGM by wide margins. These results provide strong indications that HGM, equipped with CMP, offers more reliable estimate of metaproductivity and effectively mitigates the MPM issues inherent to SICA and DGM.
'The leading SWF-agents on httpt:ttt//....... htwp:///wwwwwwwwwt/h..... (Lite) as of 22 September 2025.

---

Published as a conference paper at ICLR 2026
Table 2: Self-Improving Capability Comparison. We report the task performance (in accuracy) of each method's best-belief agent and the allocated CPU-hours time required for 800 evaluations. Super-scripted accuracies with "+" indicate performance gains over their respective initial agents.
SWE.-Verified-ee
Polyglot
Best-belief Agent of
Acc. (%)t
Time (hours).
Acc. (%)1
Time (hours)..
SICA DGM
50.0+10
infinite loop
25,4+5.1
572
53.3 -13.3
1231
27.1 +.6.8
2385
HGM (Ours)
56.7 16.7
517
30.5 10.22
347
4.2
EVALUATING HGM SELF-IMPROVING CAPABILITY
To validate our hypothesis that our CMP estimator better predicts future seff-improvement and hence leads to more effective self-modifications, we evaluate HGM against two ttate-ofthee self- improving coding agent methods: DGM and SICA. We conduct controlled experiments under the same setup as DGM, with budget-friendly modification applied consistently to both HGM and all baselines to ensure fairness, i.c., we adopt more cost-efficient backbone LLMs (GPT-5 for expansion and GPT-5 mini for evaluation for SWE-Verffied; Qwen3- -ooaa---oo---0---33--B----- and
for expansion for evaluation for Polyglot). For all methods, we start with the same initial ancestor, which achieves 40% and 20.3% on the SWE--erifiedd and Polyglot, respectively. We compare the task performance of their best-belief final agents after maximum allowance of 800 benchmark task evaluations, selected in DGM and SICA using empirical means. In addition, our asynchronous parallelization of expansion and evaluation should enable the self- improvement to consume fewer allocated CPU-hours than DGM and SICA (see Sec. 3.2p. To verify this, also report the allocated CPU-hours required for 800 evaluations.
Results &. Discussion We summarize the comparison results in Table 2 Across both SWE- Verified-60 and Polyglot, all three methods successfully perform agent discovery by optimizing the initial agent through self-improvement. However, HGM's best-belief agent demonstrates not only the highest task performance-56.796 on SWE-Veriffed-60 and 30.5% on Polyglot- also the best efficiency, requiring the fewest allocated CPU-hours for 800 evaluations: 6.86x faster than DGM and 1.65x faster than SICA on Polyglot, and 2.38x faster than DGM on SWE-Verified-60. Notably, on SWE-Verified-66 SICA repeatedly encounters "query length out-of- LLM-LLMteM--------- woonnwxxtwwidow" dur- ing self-improvement processes after 360 evaluations. Despite this, the Polyglot results validate our hypothesis on HGM's runtime advantage over the baselines. In conclusion, HGM, equipped with a better utility estimator and asynchronous expansion-evan evaluuaion iterations, establishes itself as a more effective self-improving mechanism compared to DGM and SICA.
4.3 HGM VS. HUMANS: ON CODING AGENTS DESIGN
To gain better understanding of its potential, extend our evaluation of HGM by benchmarking against the best human performance in coding agent design on SWE-Lite. We consider two settings: 1) optimization on full SWE- Verifidd and 2) generalization SWE-Lite.
4.3. OPTIMIZATION ON FULL SWE-BENCH VERIFIED
we scale HGM evaluation to the full In this experiment, rather than using the challenges) with an increased number of HGM itera- SWE-Bend' Verified benchmark (500 coding tions (8000 evaluations). Under this setup, the initial GPT-5 mini agent achieves 53.2% accuracy. Notably, this stronger starting point underscores the difficulty of further improvement: as task com- plexity grows and the search space expands, naive strategies tend to plateau.
Results & Discussion After 8000 evaluations, HGM discovers an agent that solves 61.4% of tasks, surpassing the best human-designed agent built on GPT-5 mini on the SWE-Verifies leaderboard. This establishes our discovered agent as the top-scoring GPT-5 mini-based system, and positions compared to systems built stronger
among the top-10 agents over all checked submissions, backbone models that can cost 5x more (c.g., Claude-3.7), While higher scores on the leader- board do not necessarily indicate superior general coding ability-sinee both human- and machine-
8

---

Published as a conference paper at ICLR 2026
Table 3: Generalization on SWE-Lite and GPT-5. We report the accuracy of HGM's best-belief SWE-Verified agent on SWE-Lite with GPT-5 mini and GPT-5 under two settings: filtered (com- pletely unseen) and standard (leaderboard setting).
Coding Agents
SWE-Lite Filtered (%)
SWE-Lite Standard (%)
SWE-agent + GPT-5 mini
39.6
47.6
HGM's Best-belief Agent GPT-5 mini
40.1
49.0
SWE-agent + Claude Sonnet (Best on the LB)
48.3
56.7
HGM's Best-belief + GPT-5
48.8
57.3
designed agents may overfit to the benchmark-thesee results demonstrate a promising potential of HGM for competing with established human-designed baselines under identical model constraints.
4.3.2 GENERALIZATION TO DIFFERENT LLMs AND DATASETS
To ensure HGM improves general coding ability rather than overfitting to SWE-Verified, evaluate the best-belief agent on SWE-Lite (300 tasks, 93 of which overlap with SWE-Verified). To isolate agent design from backbone effects, we compare the best-belief agent and SWE-agent, the leading system (with checked submissions), both using GPT-5 mini. We also examined how the discovered agent scales when paired with larger and better-performing LLMs by replacing the GPT-5 mini backbone with the GPT-5 model. Performance is reported in two settings: Filtered (completely unseen tasks) and Standard (leaderboard setting).
Results & Discussion. As shown in Table HGM's best-belief agent, agent, discovered on SWE-Verified, generalizes strongly to SWE-Lite, achieving 40.1% the Filtered setting and 49.0% in the Stan- dard setting. Compared to its initial ancestor (34.8% and 44.0%. respectively), these gains demon- strate that HGM's self-evolution improves general coding capability rather than overfitting to the optimization benchmark. Under identical GPT-5 mini backbones, the HGM-optimized agent out- performs the SWE-agent (which attains 39.6% filtered and 47.6% standard), indicating that the improvement stems from agent design rather than model choice. Furthermore, when replacing GPT- 5 mini with GPT-5, the evolved agent maintains and further improves performance, surpassing all officially verified submissions on SWE-Bench Lite, confirming that HGM's self-evolved design principles transfer robustly across backbone scales and are not tied to a specific LLM.
LiE-Bench-Live Result. Due to recent contamination concerns regarding SWE-Bench (Zhang et al. 2025b), we also evaluate HGM's best-belief agent on more recent benchmark, SWE-Bench- Live. Our agent with GPT-5.1 Codex mini achieves ofate-of-the-art performance across methods from the leaderboard, with an accuracy of 27.0% on SWE-Bench vious leading score of 24.7% on the leaderboard at the time of submission. It further verifies the strength of HGM and the transferability of its optimized agents more up-to-date tasks and LLMss.
Lite, outperforming the pre-
RELATED WORKS
The general concepts of machine seff-improvement were first systematically articulated by Good (1966), who described the possibility of "Intelligence Explosion" once machines acquire the pacity to design more capable successors. Early work on explicit self-improvements dates back |Schmidhuber (1987), which introduced self-referential learning mechanisms in which sys- tem generates and evaluates modified descendant versions of itself. Follow-up work on self- improvement progressed through interaction and agentic reinforcement learning. The Success-Story Algorithm(SSA4 (Schmidhuber & Zhao 1996; SSchiidhuber et al. (197)) progressively forces self- modifying policies to discover more effective self-modificatio strategies. Its core mechanism based on hindsight: at each checkpoint, sequence of self relf-modiiications that did not yield higher long-term reward rates systematically undone. this way, SSA enforces continual improvement by ensuring that only those self-modificctions associated with demonstrably greater reward intake per unit time are preserved. Fitness-Mone Monotonic Execution (Kirsch & Schmidhuber 2022a b) re- duces the outer-loop design by favoring the execution of models with higher ancestral performance. Meta-discovered update rules optimized optimizers (Metz et al.) (02T) and black-box search (Lange al. 2023). On the other hand, the Gödel Machine, a fully self-referential algorithm that rewrites its

---

Published as a conference paper at ICLR 2026
own code whenever it can prove an expected-utility improvement, provides a provably and globally optimal mechanism for self inffimoprveeentt (Schmidhuber 2003).
The rise of contemporary LLMs has created an opportunity automate substantial aspects of soft- ware engincering. One concrete step in this direction is the development of coding agents, which extend LLMs with the ability to operate in conventional computing environments. ChatDev (Qian et
al.
2023) first illustrated this idea in the context of automated bug fixing, and similar frameworks
were
later explored in SWE Yang al. 2024). OpenHands (Wang et al. 2024), MetaGPT (Hong
et al.
2024). and AgentLess
Xia ct al. 2025).
The Self-Taught Optimizer ZZeiikaan et al. 2024) and Gödel Agent Yin et al. 2024) first exper- imented with agents that modify their own scaffolding. Subsequently, DGM (Zhang et al. 2025a) and SICA (Robeyns et al. 2025) extend this direction by implementing self-modifying machines as full software engineering projects, where agents modify their own repositories while validating changes through execution-gre -rroundddd software engineering tasks. Both DGM and SICA, explicitly or implicitly, assume that higher software benchmark scores correspond to greater self-improvement capacity. In contrast, HGM introduces a qualitative measure of self-improvement consistent with the theoretical Gödel Machine and directs self-modification using estimates of this measure.
The identified tree-search problem spans fixed-budget best-arm identification (BAT), Monte Carlo Tree Search, and infinite-armed bandits, introducing a distinct decision: explicit expansion actions that create new candidate leaves alongside ordinary evaluations. Fixed-budget BAI and Bayesian value-of-information methods assume a finite and known set of arms and offer guarantees for static candidates, thus not modeling the discovery of unknown arms (Audibert & Bubeck, 2010; Karnin al. 2013 Frazier al., 2008). Monte-Carlo Tree Search and its UCT variants (Coulom 2006 Koesis & Szepesvári 2006) alternate selection, expansion, and simulation, while their backup and selection rules typically target cumulative reward rather than fixed-budget final-choice objectives under noisy. low-signal feedback, with limited guarantees for pure exploration of leaf quality (Kauf-) mann & Koolen| 2017). Infinite-armed bandit formulations capture the splore-discove tradeoff but typically model discoveries as i.i.d. draws from reservoir, missing tree structure, and hierarchical dependencies (Wang et al. 2008 Bubeck et al., 2011 Carpentier & Valko 2015).
CONCLUSION
In this work, we identify key limitation in the search heuristics of current self-improving cod- ing agents: benchmark scores alone do not reliably reflect an agent's long-term self-improvement potential, as high-scoring agents may yield stagnating lineages while weaker ones can seed produc- tive improvements. We term this the siiaproducciivity-Peffrmmaa introduce Clade-eetarroducctvitty (CMP), a lineage-based metric inspired by Huxley's notion of clades. We show that, under Assumption I when applied to our self-improving coding agent search problem, a CMP oracle is sufficient to implement the Gödel Machine (Theorem I..
Mismatch. To address it, we
Building this principle, propose the Huxley-Gödel Machine (HGM), which approximates CMP and guides expansion via Thompson sampling with adaptive scheduling. Empirically, HGM consistently outperforms previous self-improving methods while reducing allocated CPU hours. It achieves human-level coding agent design performance on SWE-bench Lite with GPT-5, despite being optimized on SWE-bench Verified with GPT-5 mini, demonstrating generalization across datasets and model shifts. The HGM discovered agent also achieves state-of-the-arr performance on SWE-bench-Live Lite when paired with GPT-5.1 Codex mini. Together, these results indicate that our clade-basee based measure of improvement potential, rather than immediate benchmark performance, enables more effective self- eef--improeement, suggesting a paradigm in which agent improvement is driven by the long-term metaproductivity of entire lineages rather than short-term gains.
While HGM currently focuses on symbolic self-improvement, editing scaffolds, prompts, and high-level control logic while treating architectures and weights as fixed hardware, an interesting next step is extending this framework to operate directly over weight space. Weight-level self- modification (Schmidhuber, 1993] Metz et al. |021 Irie et al. 2022 Kirsch & Schmidhuber] (002b Lu et al. 2024| Ishibashi et al., 2024) would open an even larger landscape of potential improve- ments. Although our present instantiation remains at the symbolic layer, the underlying mechanism is intrinsically compatible with weight-level modifications. We view this integration of symbolic and parametric self- eeff-improvement promising and ambitious direction for future work.
10

---

Published as a conference paper at ICLR 2026
ACKNOWLEDGMENT
We thank Yuhui Wang for the discussions during the early stages of this project. We gratefully acknowledge Jenny Zhang and Shengran Hu, the authors of Darwin Gödel Machine, for sharing their insights about DGM and their implementation experience. We also thank Yilan Zhang, Rui Zhang, and Lisiyu Xie for their help in designing the visualizations. The research reported this publication was supported by funding from King Abdullah University of Science and Technology (KAUST)- Center of Excellence for Generative AI, under award number 5940.
ETHICS STATEMENT
An agent that can rewrite itself arbitrarily carries inherent risk, i.c. the agent may eventually change in unexpected ways. We do the necessary due diligence to ensure that the HGM's behavior is per- formed in safe, fully sandboxed environment. This ensures that any ooff-modifications remain contained and cannot influence systems beyond the experimental setup. More importantly, studying self-improving agents such controlled settings allows us probe how these systems evolve, what kinds of changes they gravitate toward, and how their capabilities unfold over time. By observing the dynamics molfiiodiiiittion this early stage, we gain insight into the mechanisms that might govern more advanced systems in the future. Moreover, framework which the dynamics of self eeff-modifiing agents can be examined empirically and theo- retically. We believe this framework paves conceptual foundation for understanding, guiding, and ultimately designing safer self-improving AI.
CMP and its estimations provide
REPRODUCIBILITY STATEMENT
The codebase to produce our experimental results is based on the officially released GitHub Repos- itory of Darwin Gödel Machine Zhang al. (202aa). Adjustments have been made detailed in Appendix C.T. We provide our source code to reproduce the results as reported in Section 4 in the supplementary material.
LLM USAGE
Large language models (LLMs) used to help discover relevant works in the literature. In partic- ular, they have been used for suggesting papers in upper-bound based tree search algorithms. LLMs also used to polish the writing and fix grammatical errors.
REFERENCES
Shipra Agrawal and Navin Goyal. Analysis of thompson sampling for the multi-armed bandit prob- lem, 2012. URL
Jean-Yves Audibert and Sébastien Bubeck. Best arm identification in multi-armed bandits. In COLT-23th Conference on learning theory-2010, pp. 13-p, 2010.
Sébastien Bubeck, Rémi Munos, and Gilles Stoltz. Pure exploration in finitely-armed and continuous-armed bandits. Theoretical Computer Science, 412(19):1822-1822 2011.
Alexandra Carpentier and Michal Valko. Simple regret for infinitely many armed bandits. In Inter-
national Conference on Machine Learning, pp. 1133-1141. PMLR, 2015.
Olivier Chapelle and Lihong Li. empirical evaluation of thompson sampling. In J. Shawe-Taylor, R. Zemel, P. Bartlett, F. Pereira, and K.Q. Weinberger (eds.), Ad- vances in Neural Information Processing Systems, volume 24. Curran Associates, Inc., filess/aper/20111
2011. URL http:::::/..pceeeeec.oseeeeeeeee
Neil Chowdhury, James Aung, Chan Jun Shern. Oliver Jaffe, Dane Sherburn, Giulio Starace, Evan Mays, Rachel Dias, Marwan Aljubeh, Mia Glaese, Carlos E. Jimenez, John Yang, Leyton Ho,
11

---

Published as a conference paper at ICLR 2026
Tejal Patwardhan, Kevin Liu, and Aleksander Madry.
Introducing SWE-bench verified, 2024.
Rémi Coulom. Efficient selectivity and backup operators in monte-carlo tree search. In International conference on computers and games, pp. 72-83. Springer, 2006.
Richard Dawkins. The evolution of evolvability. In Artificial life, pp. 201-220. Routledge, 2019.
Tom Everitt, Daniel Filan, Mayank Daswani, and Mareus Hutter. Self-modification of policy and utility function in rational agents. In International conference on artificial general intelligence, pp. 1-11. Springer, 2016.
Peter Frazier, Warren B Powell, and Savas Dayanik. A knowledge-gradien policy for sequential information collection. SIAM Journal on Control and Optimization, 47(5):2410 2439, 2008
Paul Gauthier. ol tops aider's s new polyglot leaderboard. htttps///adderrcctt/22222
21 21/polyglot. html dec 2024. Accessed: 2025-09-22.
Irving John Good. Speculations concerning the first ultraintelligent machine. In Advances in com- puters, volume 6, pp. 31-88. Elsevier, 1966.
John Storrs Hall. Self-improving ai: An analysis. Minds and Machines, 17(3):249-253 2007.
Jesse Love Hendrikse, Trish Elizabeth Parsons, and Benedikt Hallgrímsson. Evolvability as the proper focus of evolutionary developmental biology. Evolution & development, 9(4):393-401, 2007.
Sirui Hong, Mingchen Zhuge, Jonathan Chen, Xiawu Zheng, Yuheng Cheng, Ceyao Zhang, Jinlin Wang, Zili Wang, Steven Ka Shing Yau, Zijuan Lin, et Metagpt: Meta programming for multi-agent collaborative framework. International Conference Learning Representations, ICLR, 2024.
Julian Huxley. The three types of evolutionary process. Nature, 180(4584)454 455, 1957.
Intel. Autoround. httpge///gttno..ccmmm/nnn////ttt Accessed 2025-09-25.
2025. GitHuub repository.
Kazuki Irie, Imanol Schlag, Róbert Csordás, and Jürgen Schmidhuber. A modern self-referen reffrreferential weight matrix that learns to modify itself. In International Conference on Machine Learning, pp- 9660-9677. PMLR, 2022.
Yoichi Ishibashi, Taro Yano, and Masafumi Oyamada. Can large language models invent algorithms to improve themselves?: Algorithm discovery for recursive self-im iiffimppoveeent through reinforce- ment learning. arXiv preprint arXiv:2410. 15639, 2024.
Carlos E Jimenez, John Yang, Alexander Wettig, Shunyu Yao, Kexin Pei, Ofir Press, and Karthik R Narasimhan. SWE-bench: Can language models resolve real-world github issues? The Twelfth International Conference Learning Representations, 2024. htttht:
peet/oorumiid-ie 6
Zohar Karnin, Tomer Koren, and Oren Somekh. Almost optimal exploration in multi- bandits.
In International conference on machine learning, pp. 1238-1244 1246. PMLR, 2013.
Emilie Kaufmann and Wouter M Koolen. Monte-carlo tree search by best arm identification. In Guyon, U. Von Luxburg, S. Bengio, H. Wallach, Fergus, S. Vishwanathan, and R. Garnett (eds.), Advances in Neural Information Processing Systems, volume 30. Curran Associates, Inc., 2017.
Louis Kirsch and Jürgen Schmidhuber, Self-referential meta learning. In First Conference on Auto- mated Machine Learning (Late-Breaking Workshop), 2022a.
Louis Kirsch and Jürgen Schmidhuber. Eliminating meta optimization through self-referential meta learning, 2022b. URL /ttl.tttss///aaxivvoo.
14392
12

---

Published as a conference paper at ICLR 2026
Levente Koesis and Csaba Szepesvári. Bandit based monte-caree planning. In European conference on machine learning. pp. 282-293, Springer, 2006.
Robert Lange, Tom Schaul, Yutian Chen, Tom Zahavy, Valentin Dalibard, Chris Lu, Satinder Singh, and Sebastian Flennerhag. Discovering evolution strategies via meta-black-box optimization. In Proceedings of the Companion Conference on Genetic and Evolutionary Computation, pp. 29-30, 2023.
Tor Lattimore, Csaba Szepesvari, and Gellert Weisz. Learning with good feature representations in bandits and in rl with a generative model, 2020. URL htttp:://axxiiyy/ wttp://gggaaball//////
07676
Chris Lu, Samuel Holt, Claudio Fanconi, Alex Chan, Jakob Foerster, Mihaela van der Schaar, and Robert Lange. Discovering preference optimization algorithms with and for large language mod- cls. Advances in Neural Information Processing Systems, 17786528-865777 2024.
Luke Metz, C Daniel Freeman, Niru Maheswaranathan, and Jascha Sohl-Dickstein, Training learned optimizers with randomly initialized learned optimizers. arXiv preprint urXiv:2101.07367, 2021.
Eric Nivel, Kristinn R Thórisson, Bas R Steunebrink, Haris Dindo, Giovanni Pezzulo, Manuel Ro- driguez, Carlos Hernández, Dimitri Ognibene, Jürgen Schmidhuber, Ricardo Sanz, et al. Bounded recursive self improvement...... arXiv preprint arXiv:13/2.6764 2013.
Chen Qian, Wei Liu, Hongzhang Liu, Nuo Chen, Yufan Dang, Jiahao Li, Cheng Yang, Weize Chen, Yusheng Su, Xin Cong, et al. Chatdev: Communicative agents for software development. arXiv preprint arXiv:2307.0799: 2023.
Maxime Robeyns, Martin Szummer, and Laurence Aitchison. A self-improving coding agent, 2025.
Schmidhuber. Gödel machines: self-referential universal problem solvers making provably opti- mal seff-improvements. Technical Report IDSIA-11-03, LO03::c. IDSIA, Manno- Lugano, Switzerland, 2003. Revised 2006.
Schmidhuber. Gödel machines: Fully self-referential optimal universal self-improvers. B. Go- ertzel and C. Pennachin (eds.), Artificial General Intelligence, pp. 199-226. Springer Verlag, 2006. Variant available as arXivvcs.L0//330044..
Jürgen Schmidhuber. Evolutionary principles in relf-referential learning, or on learning how to learn: The meta-meta-. hook. 1987. o Wttp:/oog//CCooooooeeeo
264351059
Jürgen Schmidhuber. 'self-referentiall weight matrix. In International conference on artificial neural networks, pp. 446-450. Springer, 1993.
Jürgen Schmidhuber and Jieyu Zhao. Multi-agent learning with the success- story algorithm. In Workshop on Learning in Distributed Artificial Intelligence Systems, pp. 82-93. Springer, 1996.
Jürgen Schmidhuber, Jieyu Zhao, and Marco Wiering. Shifting inductive bias with success-story algorithm, adaptive levin search, and incremental self-improvement. Machine Learning, 28(1): 105-130, 1997.
Richard S Sutton, Andrew G Barto, et al. Reinforcement learning: An introduction, volume 1. MIT press Cambridge, 1998.
William R Thompson. On the likelihood that one unknown probability exceeds another in view of the evidence of two samples. Biometrika, 25(3/4):255-99, 1933.
Xingyao Wang, Boxuan Li, Yufan Song, Frank F Xu, Xiangru Tang, Mingchen Zhuge, Jiayi Pan, Yueqi Song, Bowen Li, Jaskirat Singh, et al. Openhands: An open platform for ai software developers generalist agents. arXiv preprint 10X1:24077.16711,, 2024.
Yizao Wang. Jean-yves Audibert, and Rémi Munos. Algorithms for infinitely many-armed bandits. In D. Koller, D. Schuurmans, Y. Bengio, and L. Bottou (eds.), Advances in Neural Information Processing Systems, volume 21. Curran Associates, Inc., 2008.
13

---

Published as a conference paper at ICLR 2026
Chunqiu Steven Xia, Yinlin Deng, Soren Dunn, and Lingming Zhang. Demystifying Ilm-based software engineering agents. Proceedings of the ACM on Software Engineering, 2(FSE):801- 824, 2025.
John Yang, Carlos E Jimenez, Alexander Wettig, Kilian Lieret, Shunyu Yao, Karthik Narasimhan, and Ofir Press. Swe-agent: Agent-computer interfaces enable automated software engineering. Advances in Neural Information Processing Systems, 37:50528-50065 2024.
Xunjian Yin, Xinyi Wang, Liangming Pan, Li Lin, Xiaojun Wan, and William Yang Wang. G\ odel agent: A self-referential agent framework for recursive seff-improvement. arXiv preprint arXiv:2410.04444, 2024.
Eric Zelikman, Eliana Lorch, Lester Mackey, and Adam Tauman Kalai. Self-Taught Optimizer (STOP): Recursively Self-Impgoving Code Generation, August 2024. URL http://arxiv.
org/aba/2310 02304
Jenny Zhang, Shengran Hu, Cong Lu, Robert Lange, and Jeff Clune. Darwin godel machine: Open- ended evolution of self-improving agents, 2025a. URL httppp:://arrxi..oorr////////
22954
Linghao Zhang. Shilin He, Chaoyun Zhang, Yu Kang, Bowen Li, Chengxing Xie, Junhao Wang, Maoquan Wang. Yufan Huang, Shengyu Fu, et al. Swe-bench goes live! arXiv preprint arXiv:2505.23419, 2025b.
Yuntong Zhang, Haifeng Ruan, Zhiyu Fan, and Abhik Roychoudhury. Autocoderover: Autonomous program improvement. In Proceedings of the 33rd ACM SIGSOFT International Symposium on Software Testing and Analysis, pp. 1592-1604, 2024.
14

---

Published as a conference paper at ICLR 2026
A GÖDEL MACHINE WITH CMP ORACLE
The proof of Gödel Machine being simulated with a CMP= oracle is a simple observation that in the Gödel Machine setup, CMP, an actual state-action value function Q. (Sutton et al., [998) defined by the Gödel Machine, as the agents above the clades are not reachable according to the design of Gödel Machines. In order state this, formalize each term precisely.
We start by formulating the assumptions and definitions precisely, restating the theorem and then we write down the proof.
Assumptions. The original Gödel Machine is defined in a time-aware setting, where the prover must establish not only that proposed self-modification increases expected objectives, but also that this improvement still holds after accounting for the time required to search for proofs and compute the modification. This is necessary because, in the general case, the environment may change during these computations, and the objective is measured with respect to elapsed time.
In our setup, by contrast, the environment and the evaluation metric remain fixed throughout the agent's 's execution. The benchmark does not evolve over time, and the utility of any given agent is determined solely by its final performance on this static task. Importantly, we assume that the utility is measured by evaluation on tasks. It also follows the assumption of repeatable trials, meaning that the evaluation of a given agent on task is independent of evaluation time or prior events. In other words, we are able to reset the testing environment for each test. Furthermore, we assume that the Gödel Machine prover has full knowledge of the utility function as part of its axioms of the environment. Hence, we exclude the evaluation actions from the action space. Finally, we assume that the Gödel Machine prover does not consume budget, and that the self-modificatoos consume an equal amount of budget-exactly one budget unit.
We show that the CMP oracle is sufficient to imitate Gödel Machines in our specific setting that satisfies the following:
The policy objective function is defined function of only the final agent, with other rewards received before termination;
The agent's utility is measured by its performance evaluation tasks, under the assump- tion of repeatable trials: for any agent-task pair, the expected outcome is independent of evaluation time or prior events;
The Gödel Machine operates in a complete axiomatic system with full knowledge of the utility function;
The computation budget is finite and known;
The proofs of Gödel Machines do not consume the budget;
And each self mol-fmoiiiicttion costs exactly one unit of the budget.
Formally. we define the Gödel Machine as an optimal policy on the POMDP (let's call Gödel POMDP) defined as:
State space. Gödel POMDP operates on an extended state space, which, in addition to the tree of agents T. consists of two special agents: Opurent and Gehila, from the tree T. For a full formal descrip- tion, let's also include a remaining budget descriptor that determines the number of transitions left before the budget is exceeded.
Observation space. Observation is limited to the agents (Aparent, Ochill) and the remaining budget b.
Action space. For most states, the action space consists of two actions-accees and reject. As in the original Gödel Machine, the action selects the new parent in the next iteration. Intuitively. accept selects achild as the new parent, and reject requires the parent remain unchanged. As the policy operates on a POMDP, is a function the history of the observations, which is equivalent to the state tree T with special states Gparent and Geuld- For the sake of simplicity in notation, will refer to the newly selected parent agent as if it were the action. Thus, for policy n, Oparent ((T, Opparett Ochila, b)) corresponds to the action reject.
15

---

Published as a conference paper at ICLR 2026
Scoring function. Each policy also consists of a Score, function that scores all possible elements in the observation. Formally, Score, : Obs - T - IR is a function from observation into a function of agents that is returned when the budget b is equal to 0, from which the agent with the highest score is selected as the final agent. It is a function of the observation and not the entire only choose the final agent from the final observation.
history, as the algorithm
The policy selects the highest-scoring agent, as determined by the Score, function. Furthermore, the original Gödel Machine at the end allows only the parent or current child to be kept the final agent. Hence, we restrict the score functions such that they always produce indicator functions of one of the observed agents, i.e., one observed agent has score of I, and all other agents receive a score of zero. The scoring function corresponds to the selection made by the algorithm in our original setup. After the selection dictated by the scoring function, the agent is evaluated by the Utility function U.
Transitions. Transitions generate new self modifiicatiiin from the newly selected next parent, i.e., the action output. At each transition, a self- eelf-modification of parent is created and assigned new node Ochild- "parent becomes the Uprrent for the next time step. Formally, if a(a) is the self-modification of a, and T'r is the transition function, then Tr((T, aparent, achild b), a) (TU(a(a)), a(a), 6-1). The final reward in Gödel POMDP is (arg max Score, (Aparent, Gchitaa
Theorem now can be formally restated:
Theorem 1. Access to CMP oracle is sufficient to implement a Gödel Machine.
Proof. For the proof we adapt the original coding setting to match the notation of Gödel POMDP. Let's call it the Extended MDP. Similarly to Gödel POMDP, its state is a tree T, involving two special agents Oparent; Ochild and the budget The action space the same as in our problem and consists of a single agent T when there is still some budget left. In other cases, the policy uses its Score, function to score created agents in the trees for the selection of the final agent. The transition function adds the self-modification to the tree and sets the new apurent and a(a) as the new Ochild-
Every policy from Gödel POMDP can be mapped to a policy in the extended MDP. Specifically, let Te be a policy in the Gödel POMDP, then we define the corresponding policy in the extended MDP F (T, Oparent, Gchild; b)) TT((T, pprennt Uchild, b)). ) At each node, the policy chooses between the two special nodes, ignoring the rest of the tree.
Now adapt CMP Gödel POMDP. CMP adapted to the Gödel case is still function of a state (and agent to expand) in the extended state space (not only observation) and the agent.
CMPx ((T, ap, de, b) =E a (1.0
U( arg Score, (aBp, (B8p: d'EC(Ta,a)
PTnnamp..o am b).
U( arg max Score, (a (B)) a'c (anp.aa)
3 Qr, ap: Ocs a).
Where TB is the final unrolled tree, an, is the final parent and az, is the final child in the sampled trajectory. The second equality (2) comes from the fact that the Score, is equal to for exactly one element from the final observation -either ag, aB (paragraph A). The third equality (3) comes from directly unrolling the Qa-value function.
The Gödel Machine is defined by prover that produces proof whether accepting or selecting given node (or rejecting). Here, the algorithm by having access to CMP has access to the true Q value function in the Gödel POMDP. This serves as proof of better objective of either parent or the child. Additionally, we state that we break the tie by selecting the parent node as the original Gödel Machine. Hence, the algorithm that follows it is Gödel Machine.
16

---

Published as a conference paper at ICLR 2026
Independently, this proof directly shows that Gödel Machine selects an action that maximizes its own -aluue function, it is optimal due to the Bellman Optimality Equation. With the procedure shown above, can adapt it to the extended MDP.
17

---

Published as a conference paper at ICLR 2026
B ALGORITHM
Algorithm D presents the procedure of HGM.
In the standard HGM, when expansion ends with evaluation actions have the choice of choosing a. At the beginning of the search, the first actions have the most dense ratio of expansion actions, and the following evaluation actions would diverge more from the standard HGM since most of their choices are not generated yet, concentrating on the early finished expansions. Therefore, avoid this bias, we initialize by expanding the initial agent 5 times with each of the processes in parallel.
added to the tree, the next following
The asynchronization also introduces another bias that favors agents with fewer evaluated results to be more often selected for evaluation than in the standard HGM. This is due to the fact that the easy tasks usually stop earlier than the difficult ones. This yields agents with fewer evaluations having higher empirical mean. During our experiments, we observed that many agents were successful on the first ten evaluated tasks; however, this accuracy drops quickly as the number of evaluations grows. After having more than 50 evaluations, this bias is barely observed.
Algorithm Huxley-Gödel Machine (HGM)
1: Input: the initial agent ao, widening parameter a, and the percentile for final selection
2: Initialize tree T with root dg
3: Initialize counters nuscosss (a), C (a), Pssuceess (a), Mitaturo (a) for all a E T
4: while Computational Budget not Exceeded do
5: if [T] S n² and expandable parents exist then
6: Expand:
7: for each node E T do Sample (a Beta(r + n ( =(1 + re (a)))
8:
9:
end for
10:
Select node a* = arg max, (c(a) Create child by self-mi aiff-mdiiication of a*
11:
12:
Add to
13:
else
14:
Evaluate:
for each agent with remaining tasks do
16:
Sample S(a) ~ Beta(T(1 + Neusssss (a)), 7(1 + Reaiiure (a)))
end for
18:
Select agent a* = max, S(a) Allocate a benchmark task a* update Nsucceess fffallure for a² update ssuccess: 11 fuilure for and ancestors end if
19:
20:
22:
23:
end while
24:
Return argmax + (a Dataiture (a))
18

---

Published as a conference paper at ICLR 2026
C EXPERIMENTAL DETAILS
C.I INITIAL AGENTS
Our initial agents applied in Section 4.2 are adopted from the official implementation of DGM with minor changes, including modifying API support, setting up timeout option, and adding length of LLM interaction restriction. The initial agent is essentially single loop of LLM queries with two tool options, i.e., file editing and bash command execution. We set time limit of one hour for each agent execution.
The initial agents used in SWE-hench experiments and Polyglot experiments differ in that the Poly- glot imitial agent includes test commands with different programming language support. There are two additional functions in the SWE-bench initial agent that serve to summarize existing tests and exccute the tests with report generated, respectively.
The initial agent employed in Section 4.3 further adjusted by removing the file-editing tool, leav- ing only the bash tool, to minimize initial inductive bias. The time limit extended to five hours for both self-mot modifiiiiiitinnn and task evaluation, reducing the risk of prematurely eliminating stronger agents due to time constraints.
C.2 OTHER DETAILS
For the Polyglot experiments presented in Section the exact large language model used for self-modification is an int4 and int8 mixed quantized version of -ween--Coder4800--A3SB------ generated by AutoRound (Intel 2025). Overall, we spent approximately $5000 USD to produce the experimental results, including all three methods.
19

---

Published as a conference paper at ICLR 2026
D EMPIRICAL CMP AND ITS ESTIMATION
In this section, we provide the exact formula to compute the empirical CMP and the variant of our CMP estimator being used in Section 4.1 for correlation analysis. The empirical CMP of agent as node in a tree is defined as
success (a')
maXa'
saccess (a') Mafalture (a')
The prediction of our CMP estimator is defined as
sucoess (a) Msscccess (()) n suocosss (D*)
T1 Failure
(a)
Fifilture (a) Paiture (b*) ni auccosss (a)
Nsuccesss (a) n
Muccosss (b*)*
where bo is child of such that
Nesaoosss (n)
argmax Tifailure ( nC((6) 0.
For both SICA and DGM, consider the benchmark performance of an agent as their estimator of the agent's CMP.
20

---

Published as a conference paper at ICLR 2026
E BASELINES
Table 2 summarizes the three subpolicies of SICA, DGM, and HGM, which define solutions to the iterative tree search problem defined in 2
Subpolicy
SICA
DGM
HGM (Ours)
Mod vs. Eval
Alternaess modification and evalu- ation.
between
Alternates modification and evalu- ation.
between
Adaptive choice be- tween modification and evaluation.
Modification Strategy
Greedily selects the agent with the best performance up to this point and modifies it with the entire history accessible the agent.
Selects the node proba- bilistically based on the evaluation metric and the number of children the agents.
Selects the node based on the statistics of the clade stemming from a given node.
Evaluation Strategy
Evaluates the most recently created agent on the entire evaluation dataset.
Progressively evaluates the last created agent on subsets of the dataset, expanding if results are
Selects the agent based on the statistics and evaluates it single task.
promising.
Table 4: Comparison of structured policies across self-improving methods. Each method is de- scribed by three subpolicies: Mod vs. Eval, Modification Strategy, and Evaluation Strategy.
21

---

Published as a conference paper at ICLR 2026
F DISCOVERED AGENTS
We present interesting findings about HGM-diisovvred agents during our experiments. By man- ually inspecting the diff patch files that were generated by molffmodifiitiion, we make interesting observations.
One engaging self- self-modification we found implements iterative refinement to make incremental im- provements. In the self-improving context, means that during one expansion Selffmoodiiication step. the agent is accurately performing multiple self eeff-modiiications. More interestingly, this phe- nomenon can be viewed as the agent being self-motivated to perform self-modification. instead of being instructed do so by humans. This self-motivated repetitive self-modification automatically creates arbitrary levels of meta inttaammroeeenttt in the sense that each self- self-modificatio consider all its subsequent self modifications, which the subsequent self sol--moiiiicttions also need to consider future self- suff-modifications. We show in List | the part of the patch file that includes the implementation of this celf-modificttion.
ideally needs
Another interesting phenomenon we observe is the file structures that self-modifying agents create. Many agents tend write the chunk they self- self-modify into a diff patch file, usually with a constant file name. When multiple consecutive attempts of these self-modifying actions apply, the structure of these git diff files becomes abstruse. Imagine that there is a diff file that includes certain edits. Once there are changes applied this file, it then generates the diff patch file. In this patch file, a nested format editing record appears. At the beginning some lines, there are multiple + and signs that correspond nested file edits. This is natural format to present information that inspires long-sighted seff-improvement since it shows how seff-modifications indeed influence subsequent self-modifications. The authors find mind-bending understand such file structure and parse the semantics manually, For readers interested in further investigation, we provide one instance of such file structure List
Listing 1: The self-modifying agent that executes multiple self-modifications per instruction. +def attempt_erron resolution (git_dir, test_output, Leat_errory language)
Attempt to automatically diagnese and resolve errors. Returns tuple of (resolved, message) where resolved indicates if errors were tixed. ***
log ("Attempting automated error diagnosis and resolution....)
* Diagnose prroors diagnosis diagnose errors
using enhanced bash tool function
test test_error, "")
if not diagnosis ("has_errors")
return False, "No errors detected to resolve."
inoolution_messagee
[[]
# Try to apply automated fixes for each diagnosed error for error in diagnosis "eerrrr"]
safe_ (E error: |error type') || [error description'|1"
A Simple resolution strategies based on error type if error error("type") ["type"] "bythen__odule_not,_
A For Python module not found errors, we might install the
+ module
match re. search NN module named ([*')))", error[" description"])
if match:
module = match.group. (1)
Desolution_messageer append (1 (f"Would attenpt to install
Python module: (mcdule)")
practice, would run: pip install (module)
22

---

Published as a conference paper at ICLR 2026
# But we'll skip actual installation to avoid side
effects
clif error ["type"] ==
and "file" in error: # For syntax errors, we could potentially apply fixes file_path ps.path. path.joinggit_dii. error ("fole"file") if os. ex.pats (fill__aatt)
resouutionnmmssee..ppe.. (f"lllld attenpt to fix syntax error in (tile_pathl at line ferror.gen L'ne'', 'unknowa') ) {")
# In practice, would use the editor tool's ' apply_fix
command
# This is just a demonstration of what could be done
elif error ["tppe" == "test_ "eestfaalurre"
# For test failures, might suggest reviewing the implementation
wtw.:/oommssssssppppppseo ("Would analyzo test failures and + suggest implementation improvements")
if resclution_men massonnnmmsgess
return True, "Automated resolution attempted:\n' + "An".join
4 resolution_messages,
else:
return False, "No automated resolutions available for detected errors."
class AgenticSystent def _init_
self, 88 -243, 1293,16 80 Your task is to make changes to the files the { + self.git_dee directory to add
safe_log (f"Attempt (attempt 1) test results: P'PASSED if test_success else 'FAILED' )")
# If tests failed, attempt automated error resolution if not test_success: resolved, resolution_messag attempt_error_reeolu self.git_diz dir, test_output, Lest_erres self language
safe_ log (f"Errer resolution: [resolution_nessaet message)
l Even if we couldn't automatically resolve, we still provide feedback # In more advanced implementation, we might actually
apply fixes here
If this is the first attempt or tests passed and we didn't have a successful attempt yet, update best patch if attempt == 0 or (test_success and (best_pateh) is None or not best_test_results)):
best_patch current_patch
88 2278, 37 4338, 88 Please revise your code to fix these issues and try + again.
# Log final summary
safe safe__oo FINAL SUMMARY ['=x 220)")
(f"__l solution found on attempt: (best_test_rosultes 4 attempt'] 1f best_tost_resulte clse Nonn''""
(afe_log passed: (bost_tost_reeulttof ttopuuttottttttscccossss if post_testtressieee else Unknown'
safe_log((""Fnna test result: ('PASSED beat_test_result and
best_test_resulte ("test_successs' else 'FATLED )*)
if best Dest_tesstreesutts:
23

---

Published as a conference paper at ICLR 2026
safe (f test Lutput:ln/best_teees test_output'']") if best_test_reeulee (' test_erroo''
safe_log (f*Final test errors: ttboosootttttttssssslllls
+ test_error']]
# Save attempt history to a file
history_file = os. joi dirname (self.
4 chat chat_history_ttee file), pettempt_history]
with (pintoootory_fil
'w") f.write Attempt History'nin")
for result in self.attemt__historyy
w. Attempt tesccet//tessssicesss success' [ (f Passed**:
W.riit Calls Used+:: (result(" calls') An*) E.
4 M("")
(f (f*: Error " "In t'tost_croor" 1
"1)"))
f. f.write Pftthat "
return bool (best_test_results and Dest_test_resullee 4 test_success'"]
Listing 2: An instance of the nested diff patch format.
diff --git a/attempt_histove
Paatempt_history
new file mode 100644
index 0000000..bb12b1la
/dev/null
4++ b/attempt__iisoryy
08 -0, +1, 00
+F Attempt History
**# Attempt 1
***Tests Passed**; True
+**LIM Calls Usedæ*: 18
+**Test Output+*:
test session starts
*platform linux -- Python 3.10.18, pytest-8.4.2 pluggy-1.6.0 /uar/
1ocal/bin/pythhe3..10
tcachedir: .pytest_cache
trootdir: /dgm
*configfile: pytest. ini
+testpaths: tests
*plugins: asyncio-1.1.1 anyio-4.10.0
tasyncio: mode-strict, httprccceeeeatffffeueeooooooooeo
4 htt.://teeee...aao.....ooaoeaaae PASSED
toollecting ... collected 29 items
#tests/test. tol.
4 38|
PASSED
+ [ 64]
hei.aeaaaaatttraaaaaaaaaaoooooor PASSED
4 10%] htt.s///eettttaao....///////aa/a PASSED
4 138]
4 PASSED 178]
PASSED
4 20%]
PASSED [ 24 comommandd
24

---

Published as a conference paper at ICLR 2026
+tests/test. cassst_baahtttooloo : http:paceeaaaaopoooooorraaaataaa
+ nonexistent/patal PASSED [ 278]
: otg.apaee..oaa....c..o..ooao.ooo
+ nonexistent] PASSED 31$]
http://c.....a..ooo....aaaaaaaar PASSED 348]
hrt.a//ia......aaa......toaioorr PASSED
4 37%] oag.aaaeii.a.aaia.......o.aaoorr PASSED
41%
PASSED
4 448]
PASSED
4 488]
4 PASSED [ 518]
htt.ep/eee..............o.ooooor PASSED
4 55$]
PASSED [ 583]
httpap/eee...iiiaaa....eeaaaaaaa PASSED
4 (
htte:///eeaaaalllllarraaaaaaoaor PASSED
4 6588
+ unknown_command] PASSED 688]
httpe//eee.cccaaa.//.aaaaaaaa..r [] PASSED
+ 724
[None]
4 PASSED [ 758]
hetesfatet..s...aaoossssrrreeeor 79t] 7998
4 +to.appppppa.aooooaoaacooooooooa
41g.apppeehauuuuuuua..oaa2ooaaa0 PASSED 828]
4
=r PASSHD [ 89%]
oe PASSED 938)
+
+.ees_.pppiiallllllnnnnpooooonoe 96%]
+
[ott_appyy..ypttaa..orooooo.. . PASSED [100$]
PASSES
short test summary info
*PASSED ort.a///ee.....o.ooo...o.rrrrorr
#PASSKD http://ew.....attorr.r..aaaeaaer
#PASSED htt.s///eeaaaaooooo....c.oooooor +PASSED htt.a///w..caaaaao...oooooooaaar +PASSED http:///ecccaaaaoooooo..aaaaaaer
+ test org.aea..................o.a....
+PASSED htt.a//sess.aaaaee..aaaaaaaaaaar +PASSED htt.a///11.aaaaaa.///////.......
4 1nvalid__commnd_naae]]] +PASSED htt.g//ssccccaaaaa........ooo.er [cd nonexistent//pata] +PASSED arg.a///ee..a.aa.......aaaaaaaaa
4 /nonexistent]
+PASSED tests/test_baste oett://ees..aaaaloooooorrrrtttrr
+ test_ aest_coomand__itha tet._commaaattttt...eeeaaaaaaaat
*PASSED htt.s////ee...aaaoooooooooaaaaaa muliie Line output
25

---

Published as a conference paper at ICLR 2026
+PASSED sts.s
*PASSED oetp://e_.a.lllll.....eaa.rrrrrr +PASSED http:///weeaaaaa........a...aaaa +PASSED hetp://sss.aat..00000111-10t1111
+ [=c.scceeii..eeettiioe..........
+PASSED http://eescciiii........aaararrr +PASSED teat://sss.ciiiooo......eatrtrrt
+ oet_eeaeeeeoooxocooa.a..........
+PASSED httpa//www.aaaatto....o..o.o.aaa +PASSED http://ee..attt...............a. #PASSED http:///eeaeaaea......a...0e...0 
4 +PASSED http:///eeeeeeeeee...../////r/rr +PASSED httpa//ww.aaatttaa.....aa......a
[]
None] +PASSED http:///eeeaaaaaaaaaaaaaaa////ar
+ -ct.appphhh.aooo..c.oooooaaa.aa. +FASSED orlp://eeccccccccoooooooooroarar #tt.pp/pw.aoooooa.....oooooooaa.
+PASSED http:////saaaacaaaaaaaaaaaaaaaar
4 test_m__erroo_iiiansssssss
+PASSED http:///eeerrrrooooooooooorrrorr
+ test_ @et.ee...ootttcdpopoooddaadttee.
+PASSED wttp:///ee........o.oaaaaaaaaaar
+ test test ttte errors
+PASSED + [ese__appyyymlsssnnnnlnpooo.tff
+PASSED tett:/ces__erroociignnneiis
test_apply_syyttxxeerrrr. 29 passed in 3.58s
433
***Test Brror**:
413
***Patch*::
+diff --git a/coding_agenn agent.py s/coding_agent....
+index 78e8a44. . 100644
+--- a/coding_agent.22
+444 b/coding_agent.pp
+00 -5, +5, ee from logging. handlers import CotatingFilettandde
+ import os
import threading
import time
++import json
++import re
from 1im_wihhtools import CLAUDE_MODEL, OPENA L_MOO1,, chat_with_agent from utils. (ills.git_utils import diff_versus_commi t, reset_to_commic
+ apply_patch
++from tools.bash import diagnose_erros errors
++from tools.edit import autcntedee fix, read file, write file
++ roset_te_commit (git_ commit)
+ apply_patcch
patch_str)
+88 -136, 6 +140, 52 0e def run_tests (git_dir, (ir,, language): # Always change back to original directory
es. chdir (original_cwd)
++def error www.rrrrrrroortioooooo (git dir, test_output, test_error, language
+ ):
26

---

Published as a conference paper at ICLR 2026
Attempt automatically diagnose and resolve errors.
Returns tuple (resolved, message) where resolved indicates if errors were fixed.
++
++
safe_leg ("Attempting automated diagnosis and resolution...."
++
++
Diagnose errors using our enhanced bash tool function diagnesis = diagnose (test_ottett_uuppuut test_error, "")
++
++
if diagnosis ["has_errors"]
44
return False, "No errors detected to resolve."
44
++
++
Try to apply automated fixes for each diagnosed error for error in diagnosis (oaroiiiss"rrrsso ["crrers"]:
++
++
(afc_log (FFFoccssiin errer: [error ('tpee' ] - {error['
description' }}")
++
# Simple resolution strategies based on error type if error ["type"] --
++
catulll_nt__foodeee # For Python module not found errors, might install the
++
module
match re. search Nr"No module named (IM) (+)"", error description")]
4
if match:
4
module match. match.greup (1)
resolution resolution_messaees. mwssages appedd (f"Would attempt to install
4 Python module: (module)")
+
# In practice, we would run: pip install (module)
# But we'll skip actual installation to avoid side
effects
++
elif error ["type"] "bython_syntax_eraa and "file" in error
4:
++
For syntax errors, could potentially apply fixes error("file")
file_path ww..pat..jiingit___.... os.path. (file path):
++
resolution recouutionnesssseseppppe (F"Mouldd atterpt to fix
syntax error in (file_path) at line serror.get ('line', 'unknown")
)))
In practice, we would use the editor tool's apply_fix
command
++
This is just demonstration of what could be done
++
elif error ["type"] "test_failure":
For test failures, we might suggest reviewing the ++ implementation
resolution httprioooomssasssseeeeeessee append ("Hould analyze test failures and suggest implementation improvements")
44
if pesclution_nessager
++
return True, "Automated resolution attempted: \n" + "An".joint
+ resolution_messeet
++ else:
return False, "No autonated resolutions available for detected e
4+
class AgenticSystem: def _init_t
self,
+08 -243, 6 +293,16 88 Your task is to make changes to the files in the { + self.gis sit.git__dii dir) directory to add
27

---

Published as a conference paper at ICLR 2026
safe log (E"Ateempt (attempt test results: I'PASSED' if test_success else 'FAILED'
++
# If tests failed, attempt automated error resolution if not test_success:
+
resolved, resclution_messag attempt_errorr_resoiiitt
+
self.git_dit, test_output, test_error, self.
4 language
++
safe_log (f"Error resolution: (resolutions (oneolseeeemssseee
44
44
Even if we cculdn't automatically resolve, we still + provide feedback
In
advanced implementation, right actually
apply fixes here
++
# If this is the first attempt or tests passed and we didn' have successful attempt yet, update best patch
if attempt 0 (test_success and (best_patch is None not best_test_results))) best_patch current_patar
+88 2788, 37 31 88 Please revise your code to fix these issues and try again.
Log final summary
FINAL SUMMARY {' =20}")
safe_log (f" Beet solution found on attempt: (best_test_reeults)
attempt'] if best_test_results else 'None' )")
(afe_log(f""ests passed:
if
best best_test__ee testulstt_rss else "Unknown')"
+ (afe_log(E"Final test result: ("PASSED' if
+ and bost_test_rccuukes httprrrrrootutttttttttsssssssss test_sucecss") clse "FAILED'
++
best_test_resultsr
+
safe_log(""P test output: beatee/etttttttt_eeuuuuel
+ test test_outpuut]]>>
+
if tarass_reeutsstttt__rrreee
safe_log (f"Final test errors: in bnteestttest_reeelleee
jest_error"
+- history_file os.path. patt.j.jciin (os. path, dirname (self. chat_history_file)) "attempt_history.nnt with opin
# Save attempt history to file
+-
4-
'w') as f:
4-
f.write Attempt Historyln\n") for result in seiff.attepp_hisstoryy f. Attempt (.write(f* Passedx*: [result["test_succe))
+-
+ ")
+-
E.write (I" Calls Used**: (resultl'lIm_cer ] Ann")
+-
Output**:\n (hteennntttttttttttttstsooo
(1)An"
Cwrite(f" ErrorA#:An " INA
4 Apniig "1"")")))
f. (f "M "
return bool (best_test_etee tesuuresutttsts and best_ "es__tss__restts tost_succoss'')
+ +dd main():
parser = argparse. ArgumentParser (description= Process repository with an agentic system.
parser.ado add__aggmennttt
required-True, help-/The
problem statement to process')
parser.ade argument arrguuuent ('--git_dizz required-True, help=/Path to git repository directery')
28

---

Published as a conference paper at ICLR 2026
parser, add argument ('--base _emmii', required-True, help= Base
commit hash to compare against')
aareer..dddargune ("achhhtthisttto_ffilll required-True, help=' Path to chat histery file')
parser.add_aae add_aadmentgttttt ('-routdir,,,, required-False, default="/dm/",, help= directory')
default-None, required- False, help= of how to test the repositozy') aarser.add_ ('--selt_ it=-seetiiipooveeeeeeee improve', default=False, action=' store_true',
aarser..dd__arumment ("--test del--tttttddsciptiioo
Whether to self-improve the repository
solving swe')
parser. ('--language', required-ralse, default="python",
phoices=('cpp', 'java', 'python', 'go', 'rust', 'javascript'), +
help='Task\ss progranming language')
parser.add pargee..ad_argumentt ("--model', required-False, default=CIAUDE MODEL help='IIM model use for processing')
aarscr.add_argumon ("--timcctt', type=int, default=3600, holp='
+ Timcout for LLM calls in seconds')
parser.add_st add__agmenttn -t=mmx__tttempts" type=int, default=3, help=' Maximum number of solution attempts')
+if
name "_main_""
+
parser - araparse.ArgumentPrrs
(description- "Run the Agentic System a coding task.") ")
++
parser.add parger.add.aggumentt( (rgument("-prrobeeeer (*=-problem_sttttment type=str, required=Drue,
help="Problen statement")
4+
parser parser. ("--git_dir", type-str, required-True, help-"Git
repository directory")
+
aarser. ("=base_coommtt" type=str, required-Irue, help
=Bass commit hash")
++
parser.add_ aarpuudennrnrmttttnaaaem hm-schat_history.
type=str, default=*./
Chat_history.mdy help="Chat history file")
++
aadser.addd_rrgmeenn (ttp:radiaarruunnnttttttttttttet ("=tcct__dscriitionn type=str, help="Test description")
parser.add
Aarser.addLarggmentttt (ttgumeetttt--se___immmeee immpoovee,_____""" action="store_truee" help="
Rnable fimproveroett mode")
++
parser.add_argument (*==lanquage", type-str, default="python", help
"Programming language")
parrser.adiaarrument (M--mode11) type-str, default=GPMMA_MMOMI,, help
=Model to use")
++
parser.add ardguunt 11--max_attempeee type=int, default=3, help="
Maximum number of attempts")
++
aarser.add_areeee add_argumettttttccc ("--timecut", type=int, default=600, help="
Timeout for each attempt")
4+
+
args parser. parser.parse_args/
+-
+- Process the repository
agentic_system AgenticSystem
++
++
system = AgenticSystem
problennsttatmmenttarg prabteesttttteeeeeeeee
git__drrargg..it__drr
+88
-319,15 +373, 08 def main():
model=args.mone max_attempts-argg.u attempts
4-
4-
I Run the agentis system to try to solve the probler.
+-
agentic_aystem. forward (args.
Get code diff and save te model paaeellppthhheee diff mocel dirf_versus model Lateel_patch_outte outfile os.path. batth.oon foin (urgs. 'model poodel__ptthhheemmm patch.diff" if args.outdir else 'model diff'
versus versus_commit targs.git git__iitttrrrriii dir, args. base commit)
args.base
29

---

Published as a conference paper at ICLR 2026
with open (model patch outfile, (w() f.write (mocel_patch)
4-
4-1f
_ = main
+-
main()
+\
No newline end of file
++
++
success = system. forward (timooutargss ttmeeeetttrrggstmmmttt.
++
exit_code = 0 if success else 1
exit (exi___c_codde
+\ newline end of file
4diff --git a/tests/test_errrr_daaaeee py
b/tests/rest_eerrr__aaoaoooo
tnew file mode 100644
+index 0000000..Sbefff0
+--- /dev/null
++++ ///teets/cett.crroo_daaaaoooooo
+88 -0,0 +8,98 e0
++import pytest
++from tools.bash import Saagnose_errors format_diaggosis
++from tools.edit import agply_automated__fi
++
++olass TestErrorDiagnoiis:
++
aef test pytttppyhhhststtteetee error wwreerrrreeeeeeeeeeeeeeeeeeereee idagnssss """Test diagnosis of Python syntax errors. "** output u" error rffie "test.py", line 3
4+
++
44
print ("Hello World"
++SyntaxError: unexpected EOF while parsing'
++
++
diagnesis = [aagnosc_crrorsoouttp error, "pythen test.py") assert diagnosis ["has_errers"] is True
++
assert len walldaagnossseerrrrrreo
4+
assert
[0] ["type"]
4+
assert "SyntaxError" in diagnosis ( [
("description")
44
def test_pythonnmodule deniie__oooo (sel)))
++
"""Test diagnosis of Pythen module not found errors. output =
++
++
error = MMddueesotFoonnErrorr No module named nonexistent_mmduue"
4+
diagnosis = dilanosc_erroossouppp
error, "python test.py")
++
assert diagnosis ("hassssshssr_rrss" is True
++
assert len [ennddiammsssseeerrrrs" ==
assert diagnosis ["errors"] [0] ("type") prtchon_mddule..m "oduue__eet_foudd" assert moonexistent_moduuk in diagnosis ("agnosis""errors" "eerrors]] [0] description"]
[iagnosis[Merrors]]]
++
44
def jest_no_error_eee (igrrrrddignnssissse1))
44
"""Test diagnosis when there are no errors. output = "Success!"
++
++
error =
diagnosis diagnose_crrors (outuu, error, "echo Success")
4+
assert diagnosis ("has_crrorss is False
44
assert len (addangosis("errrrss ==
++
def test_format_diagnosi. withh (self):
+4
"""Test formatting diagnosis with errors.
4+
diagnosis =
++
: True,
++
"errors":
30

---

Published as a conference paper at ICLR 2026
"type"; "test_error", "descriptica"; "Test error description", "suggestiens"; ["Suggostion 1", "Suggestion 2n1
++
++
+
++
++
++
formatted = format_ diagetiiggnsssssssssss
assert "Automated Errer Diagnosis" in formatted assert "Test error description" formatted assert "Suggestion 1" in formatted
44
+4
++
def cost__Eommat wweeattoiaaaanaaeee diagnedsssssss without_errors errors (self):
"""Test formatting of diagnosis without ""* diagnosis
++
4+
"has_orrors"; Falsc, "errors"; []
4+
++
44
formatted format_ dirmattdiagncsisaeco (diagnosis) assert "No errors detected" in formatted
+4
++
++olass TestRutomatedFixe:
aef test test_appl apply_missing
4+
"""Test applying a missing import fix."M "**
4-
content """def helle(): print (json, dumps (( (("message"; "hello")))
4-
++
++
Eix_infe =
++
"type"; "miosinggimport", "module"; "json",
4+
"description": "Added missing import for Jeon module"
4+
++
++
fi fixed_content - apply_autemated. _feieedddiiiide (content, fix_info)
assert "import json " in fixed_conted assert "def hello in content
++
++
++
def test test_
errer (xrer_ """Test applying syntax error *** content ""*def hello()
44
4+
print ("Hello world")
++
++
fix_info {
"type": "syntax_error_fixx" "line": 1, "description": "Fixed syntax error"
4+
++
44
fixed_content aptly_aut (content, fix_info) assert "Fixed syntax" in fixed_content
++
+1 No newline at end of file
31


Reviews:
[{"review_id": "kax8Sncxfd", "reviewer": "Reviewer_rF32", "summary": "Many works have recently emerged in code generation literature that rely on the formalism of the Godel Machine to posit a self-improving agent. This usually requires defining an approximate heuristic for the expected long term utility of a proposal. In this work, the authors (1) find that current heuristics for calculating long-term metaproductivity are slightly flawed, (2) propose a new heuristic for this task and (3) present a new algorithm which presents a more reliable estimate of the metaproductivity. Overall, the authors find that their algorithm achieves better performance on SWE-bench Lite than SWE-Agent.", "questions": "In the weaknesses section.", "limitations": "", "rating": 8, "confidence": 2, "soundness": 3, "presentation": 4, "contribution": 4, "strengths": "Significance and Novelty:\n - The paper is extremely insightful and I think it will be beneficial for the broader ICLR community as well.\n\nClarity:\n* The paper was a joy to read and I thank the authors for formally describing the algorithm as well as presenting psuedo-code in Appendix B -- this really helped better understand the details of the algorithm.", "weaknesses": "Minor dataset concerns:\n - Recent works in Software engineering benchmarking have found contaminatioon issues in SWE-Bench Lite. As such, I recommend the authors also verify results on SWE-Bench Live (https://github.com/microsoft/SWE-bench-Live).\n\t - It's understandable that a full-rerun might be too expensive. Even a small-scale experiment verifying that the main result holds on `SWE-Bench: Live - Lite` (the names are getting challenging to say out loud) would be extremely useful here.\n\n\nClarity:\n\nI caught some typos:\n- `Fig. 1 Caption`: 2.38 time less -> 2.38 times less.\n- `Page 3`: $(a_{final}=\\arg\\max \\dots \\mathcal{T}_{T}$ should have a closing bracket at the end.    \n- `Section 3.2`: When the computational budget exceeds -> When the computational budget is exceeded,\n- `Section 4.1`: `Metaproductivity-Performance Misalignment (MPM)`. This is defined in the intro as `Metaproductivity-Performance Mismatch`.\n\n\n**Overall:** While the SWE-Bench Live results will help ease some concerns about data leakage, the contributions of the paper are impressive enough to warrant acceptance already.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "Eg6HVpkR8F", "reviewer": "Reviewer_JqU8", "summary": "This paper addresses the problem of recursive self-improvement in agents. The authors point out the limitations of existing exploration strategies and propose a new method that accounts for long-term self-improvement capability. In the exploration process, an effective indicator is required to estimate the expected long-term improvement obtained when expanding a particular node (agent). Conventional approaches assumed that higher benchmark performance implied stronger self-improvement ability; however, the authors demonstrate experimentally that high-scoring agents do not necessarily produce promising descendants, while lower-scoring agents may yield superior results in the long run. \n\nTo address this issue, the authors define Clade-Metaproductivity (CMP), a metric that measures self-improvement potential based on the collective performance of an agent’s entire lineage. The proposed method, HGM, controls exploration using the estimated CMP (ĈMP) and employs Thompson Sampling to select expansion nodes, promoting long-term improvement. Experiments on SWE-Verified and Polyglot show that HGM predicts true self-improvement ability with higher correlation than DGM or SICA, outperforming them in both exploration efficiency and final performance.", "questions": "- As the authors note, the modification operator in HGM performs patch applications to the agent’s codebase (such as file editing and bash command execution) but does not modify the model itself. Although the framework aims for recursive self-improvement of the agent’s own code, the actual scope of modification does not extend to architectural design or model-level enhancements, such as loss function optimization [1] or model merging [2]. Clarifying this limitation would help define the scope and contribution of the proposed approach more precisely.\n\n[1] Discovering Preference Optimization Algorithms with and for Large Language Models \n\n[2] Can Large Language Models Invent Algorithms to Improve Themselves?: Algorithm Discovery for Recursive Self-Improvement through Reinforcement Learning", "limitations": "", "rating": 4, "confidence": 3, "soundness": 2, "presentation": 3, "contribution": 3, "strengths": "- The proposed method is inspired by the concept of clades and introduces a new metric (CMP), which measures the productivity of an entire lineage by aggregating the benchmark success of an agent’s descendants rather than relying on the agent’s own performance. This idea convincingly addresses the shortcomings of previous methods and provides a theoretically sound foundation for improving self-improving agent exploration. HGM achieves better performance than DGM and SICA.", "weaknesses": "- While the authors cite STOP as related work, they do not include it in their experiments. STOP recursively improves its own reasoning code, namely prompts and inference strategies, and thus represents a closely related setup. The lack of empirical comparison with STOP leaves a gap in the comprehensiveness of evaluation.\n- The experimental evaluation is limited to two coding benchmarks, SWE-Verified-60 and Polyglot, both within a narrow programming domain. If the goal is to improve the agent’s own tool invocation and command execution behaviors, there is no inherent reason to restrict evaluation to coding tasks. Testing across diverse task domains would better demonstrate the generality of the proposed method. As it stands, the applicability of HGM beyond coding tasks remains unverified.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "H3mPug4Viq", "reviewer": "Reviewer_dVDU", "summary": "For Recursive Self-Improvement (RSI), one needs to decide how to select among potential self-improvements. The approach studied in this paper is to do a bit of look-ahead and choose to modify the algorithm based on the performance averaged over several partial rollouts. This is a natural idea. It's implemented using frozen language models. Therefore, it is an instance of what is sometimes called Recursively Self-Improving Code Generation.", "questions": "To what extent is your implementation of DGM/SICA differ from theirs and to what extent is it modified to match your own?", "limitations": "", "rating": 6, "confidence": 4, "soundness": 3, "presentation": 3, "contribution": 3, "strengths": "The problem being studied is very interesting and has potentially enormous impact.\nThe idea of using a bit of look-ahead is very expensive but principled.\nExperiments suggest that it may be more effective than other approaches.", "weaknesses": "*Theory*: Theorem 1 is fine to include but it is not nearly enough to justify publication. The proof itself is almost tautological once the definitions are established. The theory appendix is poorly presented, which is concerning. For instance, the definitions of the concepts referenced in the statement of Theorem 1 are defined in the proof. The necessary definitions should be separate so that the theorem statement makes sense without reading the proof. Therefore the paper's justification is empirical. \n\nI found the algorithm a bit hard to follow. It would be good to include the language model prompts in the appendix. The prompts, from the supplementary materials, are rather substantial. Are the same prompts used for the HGM and DGM/SICA? In contrast, for example, the seed STOP prompt of Zelikman et al. (2023) is a half-page presented in the body of the paper. Is there a \"seed\" prompt for HGM that is at the heart of the algorithm, or are all the prompts from the supplementary material crucial to its success? \n\n*Experiments*: There are no current RSI benchmarks, and thus it is not clear how to compare algorithms. There is no easy way to benchmark RSI systems, and we have to trust the implementation of algorithms being compared against. If the algorithms have parameters, it is possible that the parameters of the HGM were better optimized to the few applications than those of the comparison algorithms. Moreover, the two algorithms compared against are from very recent papers that do not appear to be peer reviewed, so the empirical section is a comparison of implementations of three unproven algorithms. It would be good to have a more rigorous comparison framework.\n\n*Ethics*: The ethical risks of RSI are not discussed. But clearly, the development of RSI poses potential risks that numerous luminaries claim are existential. See [https://superintelligence-statement.org/](https://superintelligence-statement.org/) for example. The risk is that it's advancing science towards that goal without clear discussion of why the benefits of this progress outweigh the risks.\n\n*Small comments*: Readers unfamiliar with the term \"clade\" might appreciate a little explanation of what it means (e.g., mammals are a clade) so they don't have to look it up.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "OuFvzxZjJi", "reviewer": "Reviewer_fRaF", "summary": "The paper introduces a novel self-improving coding framework (the Huxley-Gödel Machine) to overcome the \"Metaproductivity-Performance Mismatch\" existing in prior systems. Inspired by Huxley's concept of clade, authors propose the Clade-based Metric for Potential (CMP),  which measures an agent's true potential by aggregating the benchmark performances of its descendants, rather than just its immediate performance. The estimated CMP values guide the search tree during HGM’s self-modifications. Experiments show that the proposed method surpasses prior methods on benchmarks, e.g., SWE-bench and Polyglot. Notably, agents optimised by HGM achieve human-level performance on the SWE-bench Lite.", "questions": "From Darwinist's perspective, human babies can think before they can speak; they can speak before they can write; they can write before they can program; they can write poor programs before they can write good programs. What is the starting point task that an ideal Huxley-Gödel Neural Network should solve?", "limitations": "", "rating": 6, "confidence": 4, "soundness": 3, "presentation": 3, "contribution": 3, "strengths": "This paper addresses the very challenging problem in Machine Learning, namely, to build self-improving coding agents --  how can artificial agents improve their own codes? \n\nAuthors introduce a new metric – Clade Metaproductivity Performance (CMP). The main concept is inspired by Huxley’s concept of “clade” in evolutionary biology and is computationally designed as an estimate based on an agent’s descendants. The Huxley-Gödel Machine uses estimated CMPs to select code modifications as a process of searching the “tree” of self-modifications.", "weaknesses": "The CMP is a probabilistic estimate based on historical data. Its predictive accuracy is uncertain.\n\nEvaluation used LLMs as backbone, which are black box systems. LLMs+HGM may improve performances using statistical metrics, but it is not clear whether this will indeed lead into an interpretable AGI theory.\n\nSomehow, authors try to sell their work by using big names, such as Gödel, Huxley. However, Gödel’s work is in symbolic logic. Huxley’s work supported Darwin’s theory of evolution through comparative anatomy.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}]

Author rebuttal:

Decision: Accept (Oral)