Summary (Overview)
- This paper investigates whether AI agents that engage in recursive self-improvement (RSI) of programmatic task solutions also develop reliable runtime checks that can detect task failures in deployment.
- Across five task domains (Seaquest, Kangaroo, Craftax, service autoscaling, AppWorld) with up to seven author models, agents achieve high task scores but the checks they are instructed to write miss half or more of task failures in four of five domains.
- The failures are detectable and repairable: a general-purpose monitor built from normal execution records catches most failures in three domains, and the same agents repair most missed failures when called back.
- The detection gap stems from insufficient check coverage—the checks fail to examine recorded relations that reveal the failures. When informed of the checks' purpose, Codex reduces its miss rate from 69% to 6% in Seaquest and from 95% to 0% in AppWorld, while open-weight models still miss 84–100%.
- In replayed deployments, timely detection recovers most lost task value, while a perfect repairer behind the program's own checks recovers almost none—demonstrating that detection, not repair, is the bottleneck.
Introduction and Theoretical Foundation
Background and Motivation
Programmatic agents write explicit programs that execute tasks without calling a language model at each step, offering efficiency and interpretability. These agents improve their programs through a feedback-driven process of running, observing failures, and revising code—a form of recursive self-improvement (RSI). The critical question: once a program runs autonomously without a model watching, will the system notice new failures and initiate another improvement round?
A high task score does not guarantee failure detection. During development, the agent tests and sees every failure; during deployment, nobody watches, so the system must decide when something needs attention. Environmental changes can cause a good program to fail while every action it takes remains individually valid.
Theoretical Foundation
The authors establish a framework distinguishing three properties on identical program-change pairs:
- Task performance: How well the program accomplishes its task
- Failure detection: Whether the program's own checks raise alarms
- Repair: Whether the agent can fix the program when called
A programmatic agent writes a program once and lets it act. Recursive self-improvement revises that program from its own execution feedback. Runtime checks are code that inspects observations or execution records and flags potential problems. A monitor is any mechanism that turns such signals into an alarm, and an alarm calls the agent back.
Methodology
Evaluation Framework
The framework builds a set of task failures and evaluates the same questions on every failure:
-
Building the failure set: Controlled environmental changes test whether programs still work when conditions shift. Changes are "blind"—written by isolated sessions that never saw the programs under test. A change is kept only if the task remains feasible.
-
Defining task failures: A unit is one frozen program under one change, run for ten deployment episodes. With and as mean task scores in original and changed environments:
- Detection and repair metrics: A detector is silent on a failure () if it alarms in fewer than half of the unit's episodes. Miss rate is the share of failures on which it is silent. Repair is measured by calling the authoring agent on every failure:
with the gap metric:
Task Domains and Agents
| Domain | Description | Change Catalogue |
|---|---|---|
| Seaquest | Arcade game (JAXtari) | 25 + 8 entries |
| Kangaroo | Arcade game (JAXtari) | 12 entries |
| Craftax | Open-ended survival game | 12 entries |
| Service autoscaling | Instance management simulation | 12 entries |
| AppWorld | Application API suite | 12 entries |
Author models include Codex (gpt-6.1-sol), Claude Code (opus-5-5), and five open models (Kimi-K2.6, Qwen3.8-27B, Qwen3.8-Flash, Mistral-Medium-3.5, gemma-4-31B).
Detectors Compared
- Own checks: Checks written under standard instructions, which ask agents to state assumptions with runtime checks
- General monitor: A frozen procedure learning usual ranges of generic statistics from 20 reference episodes
- Outcome rule: Alarms when success count falls below half the reference mean
- Monitor on request: Written by the author when asked after learning
Empirical Validation / Results
Q1: Do High Scores Come with Reliable Checks?
The program's own checks stay silent on half or more of failures in four of five domains:
| Programs with checks | P | F | Own checks misses (%) | Outcome rule misses (%) | General monitor misses (%) |
|---|---|---|---|---|---|
| Seaquest, Codex | 20 | 168 | 52 [32, 71] | 7 | 5 |
| Kangaroo, Codex | 6 | 22 | 55 [13, 91] | 9 | 18 |
| Service autoscaling, Codex | 4 | 25 | 64 [29, 92] | 8 | 0 |
| AppWorld, Codex | 4 | 28 | 89 [64, 100] | - | 61 |
| Craftax, Codex | 3 | 8 | 0 | 25 |
<sup>†</sup>Alarms on 68% of unchanged Craftax days.
Key findings:
- Codex's checks miss 52% (Seaquest), 55% (Kangaroo), 64% (service autoscaling), and 89% (AppWorld) of failures
- Six other models miss 65% in service autoscaling; three open models miss 82% in AppWorld
- Craftax is the exception: Codex checks catch all eight failures
- No threshold on check contradiction frequency produces a usable alarm
- External detectors miss far fewer failures (7–18%)
Q2: Can Agents Repair Missed Failures?
Codex repairs nine-tenths or more of the failures its checks miss:
- Repairs 69 of 77 missed failures in Seaquest, all 37 in service autoscaling, all 55 in AppWorld
- Repaired Seaquest programs keep 81% of original performance (up from 5%)
- The gap metric is 48%, 64%, and 89% for the three domains
- Repair success does not depend on whether checks noticed the failure or on call type (runtime report, one-bit alert, or nothing)
Q3: Why Do Checks Miss Failures?
The gap is largely a matter of check coverage. The authors formalize a monitor as , where is execution history, selects recorded variables and relations, and decides whether to alarm.
Adding informative relations (that separate changed from unchanged runs) to fixed programs:
| Domain | Own checks misses | With informative relations | With unrelated relations |
|---|---|---|---|
| Seaquest | 52% | 4% | 50% |
| Service autoscaling | 65% | 4% | 63% |
| Kangaroo | 48% | 20% | 48% |
Random relations (32) also work: misses fall to 4%, 4%, and 15%.
Informed instructions close most of the gap for Codex but not open models:
| Condition | Seaquest misses | AppWorld misses |
|---|---|---|
| Standard instructions | 69% | 95% |
| Informed instructions | 6% | 0% |
| Open models, informed | - | 84–100% |
Q4: What Does the Gap Cost in Deployment?
Replayed 10-day deployments with environmental change before day 4:
| Trigger | Seaquest value | Service value |
|---|---|---|
| No call | 0.35 | 0.37 |
| Own checks | 0.46 | 0.56 |
| Monitor on request | 0.79 | 0.83 |
| General monitor | 0.81 | 0.83 |
| Call on day of change | 0.86 | 0.83 |
Swapping own checks for general monitor gains 0.35 and 0.28 in value; swapping the real repairer for a perfect one gains only 0.01 and 0.03—detection, not repair capability, is the bottleneck.
Theoretical and Practical Implications
-
Competence ≠ self-maintenance: An agent's ability to accomplish tasks when engaged is distinct from its ability to notice when engagement is needed. Evaluations of self-improving systems should report detection metrics alongside task scores.
-
Underspecification matters: The result depends on what instructions leave open—programs with equally high scores behave differently once deployed, a case of underspecification (D'Amour et al., 2022).
-
Purpose-aware check design: Stating what checks are for (making them the sole call-back mechanism) dramatically improves Codex's check quality but not open models', suggesting instruction-following gaps in weaker models.
-
Coverage is the key variable: The checks fail because they examine too few relations in execution records. Adding recorded relations—even random ones—removes most misses, showing the signal exists but agents don't find it.
-
Deployment economics: The value of detection depends on session costs. The general monitor stays ahead of own checks until a session costs 3.7 days of task value.
Conclusion
The paper demonstrates a fundamental detection gap in self-improving agents: they can achieve high task scores and repair failures when called, but the checks they write fail to detect most failures autonomously. Failures are neither hidden nor hard to fix—they are simply not reported.
The authors contribute:
- A controlled evaluation framework measuring task performance, failure detection, and repair on identical program-change pairs
- Evidence of the detection gap across five domains and seven models
- Analysis tracing the gap to check coverage, with causal experiments
- Quantification of the deployment cost: timely detection recovers most lost value; perfect repair behind silent checks recovers almost none
Future directions include testing whether improvement loops that select versions by detection performance close the gap, whether cross-checks (metamorphic relations) hold under other changes and longer deployments, and whether stronger open models can follow purpose-informed instructions as effectively as Codex.
Related papers
- When Are Parallel Subagents Effective for Coding? An Empirical Study on Repository Construction
Parallel subagents add only 1-5 points on repository-construction tasks at 2.6-3.8x cost, with a single probe sentence recovering most of the gain.
- Harness-Delta Attribution: Dissecting Gains From Harness Evolution
Across 21 settings, harness evolution gains are largely overfitting (54%) and test-time scaling (14%), with only a residual upper bound on generalizable improvement.
- RecurSciBench: Benchmarking Recursive Self-Improvement in Data-Driven Scientific Research
RecurSciBench shows recursive self-improvement gains are system-dependent and uneven, with half of evolved states regressing, yet experience can transfer across task types and domains in non-obvious ways.