Blind to What They Can Fix: A Detection Gap in Self-Improving Agents

Teng Cao, Yu Deng, Kristian KerstingarXiv 2026

Imagine you’ve built a robot to manage your garden. You’ve taught it to iterate on its own code: it tries a strategy, sees what works, and refines its logic until the tomatoes are thriving. This is Recursive Self-Improvement (RSI), and it’s one of the holy grails of AI.

But there’s a catch. What happens when a heatwave hits, or a new pest arrives? Your robot’s code might start failing, but because it’s "self-improving" based on its own internal logic, it might not even realize it’s failing. It keeps executing its "optimal" plan while the garden withers.

This paper, "Blind to What They Can Fix," uncovers a startling "detection gap" in our most advanced AI agents. They are becoming world-class coders, but they are failing miserably as their own safety inspectors.

TL;DR

AI agents can write and improve programs to achieve high scores, but they are remarkably bad at writing the "smoke detectors" (runtime checks) needed to notice when those programs fail in new environments. Curiously, these same agents are perfectly capable of fixing the failures—they just don't notice them happening in the first place.

What Problem Does This Paper Address?

We want AI agents that can operate autonomously. To do this efficiently, agents often write "programmatic" policies—explicit code that runs without needing to call a massive, expensive LLM for every single tiny decision.

The authors look at Recursive Self-Improvement (RSI), where an agent runs its code, analyzes failures, and rewrites the program to get better. While this process produces programs with high task scores, the authors wondered: Can we trust the runtime checks these agents write?

If an environment changes (a "distribution shift"), a program that worked yesterday might fail today. An autonomous agent needs to notice this failure to trigger a new round of repairs. If the agent is "blind" to its own failures, the self-improvement loop breaks exactly when it's needed most.

Figure 1. The schematic of the detection gap: an agent improves a program, but when the environment changes, the program fails silently because its internal checks don't fire.

Methods

The researchers developed a controlled framework to test this. They took high-performing programs written by AI agents and deployed them into environments with "blind" changes—tweaks to the rules that the agent hadn't seen during training but that still allowed the task to be completed.

They measured three things on the exact same failures:

  1. Task Performance: Did the program actually fail?
  2. Failure Detection: Did the program's own internal "checks" (written by the agent) raise an alarm?
  3. Repair: If the agent was manually "called back" to look at the failure, could it fix the code?

They compared the agent's own checks against external "monitors"—simple statistical tools that just look for anomalies in the data (like a sudden change in how often a variable updates).

Datasets

The study put seven different LLMs (including Codex and Claude) to the test across five diverse domains:

  • Seaquest & Kangaroo: Classic Atari-style arcade games.
  • Craftax: A complex survival and crafting game.
  • Service Autoscaling: A cloud computing simulation where the agent must manage server capacity.
  • AppWorld: A benchmark involving complex API calls to simulated apps (mail, social media, etc.).

Key Insights and Ideas

  • The Competence-Maintenance Gap: There is a massive difference between competence (doing the task) and self-maintenance (knowing when you aren't doing the task). Agents can be brilliant at the former and useless at the latter.
  • The "Silent Failure" is the Norm: In four out of five domains, the agents' own checks stayed silent on half or more of all task failures. In AppWorld, Codex's checks missed a staggering 89% of failures.
  • It’s a Coverage Problem, Not a Capability Problem: The agents aren't "too dumb" to see the failures. When the researchers added simple, random statistical relations to the checks, the detection gap vanished. The agents simply weren't "looking" at the right parts of the execution record.
  • Purpose Changes Everything: When the authors explicitly told the agent, "Your code will run alone, and the only way you get called back to fix it is if your own checks fire," the agents (specifically Codex) suddenly became much better at writing those checks. The miss rate in Seaquest plummeted from 69% to just 6%.
Figure 2. The evaluation framework: classifying failures by whether they were detected and whether they were repairable.

Key Results

  • Repair is easy, Detection is hard: Codex repaired 90% or more of the failures that its own checks had missed, once a human "forced" it to take a look.
  • External Monitors Win: A simple "General Monitor" that just looks for statistical anomalies caught almost everything the agents missed, often with very few false alarms.
  • The Cost of Silence: In replayed deployments, using the agent's own (flawed) checks recovered almost none of the lost task value. Using a better trigger (like the General Monitor) allowed the agent to step in and recover most of the performance.

Limitations and Future Work

The authors identify several boundaries to their work:

  • Format Constraints: Runtime checks only exist in certain program formats; we don't yet know how to implement this for "black-box" neural policies.
  • Reference Data: The "General Monitor" succeeded because it had access to "normal" runs to compare against. The agents' code usually doesn't have this "memory" of what's normal.
  • Open Model Lag: While top-tier models like Codex showed they could write better checks when prompted correctly, open-source models still struggled significantly with this task.

The takeaway? If we want truly autonomous AI, we need to stop just grading them on their "high scores" and start measuring how well they know when they've lost their way.

Summary updated

Abstract

AI agents can write programs that carry out a task without calling a model at every step, so the task runs fast and its logic stays open to inspection. Agents improve these programs by running them, studying their failures, and revising the code, a form of recursive self-improvement (RSI). We ask whether this process also yields runtime checks that can be trusted. In five task domains, with up to seven author models, agents bring their programs to high scores. Yet when the environment changes, the checks they were told to write stay silent on half or more of the resulting failures in four domains. These failures can be detected and repaired: a monitor built from records of normal runs catches most of them in three domains, and the same agents usually repair them once called. The checks do not examine the recorded relations that reveal the failures, and the strongest agent writes checks that catch most of them once told that its checks are the only thing that calls it back. An unreported failure stays unrepaired, which limits what self-improvement is worth in autonomous operation. Evaluations of self-improvement should measure not only scores but also whether a system notices its own failures.
BibTeX
@misc{cao2026blind,
  author = {Teng Cao and Yu Deng and Kristian Kersting},
  title = {{Blind to What They Can Fix: A Detection Gap in Self-Improving Agents}},
  year = {2026},
  eprint = {2611.29807},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.29807},
}
Figure