← Latest papers
🤖 AI

Towards Agentic Runtime Healing

This paper introduces "Healer," a novel framework that leverages Large Language Models to dynamically generate and execute bespoke error-handling code in real-time, achieving a high success rate in recovering from unanticipated runtime errors and marking a significant step toward agentic, self-healing software systems.

Original authors: Zhensu Sun, Haotian Zhu, Bowen Xu, Xiaoning Du, Li Li, David Lo

Published 2026-05-06
📖 4 min read☕ Coffee break read

Original authors: Zhensu Sun, Haotian Zhu, Bowen Xu, Xiaoning Du, Li Li, David Lo

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine your computer program is a busy chef in a kitchen. Usually, the chef follows a recipe (the code) perfectly. But sometimes, something unexpected happens: the chef tries to chop a vegetable that isn't there, or they try to put a cake in an oven that's already full. In the software world, this is a runtime error.

Traditionally, when a chef makes a mistake, the kitchen shuts down. The chef stops, the customers go hungry, and a human manager has to come in, figure out what went wrong, and rewrite the recipe for next time. This is how most software works today: if it crashes, it stays crashed until a human fixes it.

The New Idea: The "AI Sous-Chef"

This paper introduces a new concept called Healer. Think of Healer as an incredibly smart, instant AI Sous-Chef who is standing right next to the main chef.

When the main chef trips and drops a pan (the error), instead of shutting down the kitchen, the AI Sous-Chef jumps in. It doesn't just say "Oh no!" and call the manager. Instead, it instantly looks at the mess, understands the situation, and writes a brand-new, tiny instruction on a sticky note to fix the immediate problem.

For example, if the error is "The pot is already on the stove," the AI might instantly scribble, "Okay, let's just use a different pot," and hand that instruction to the main chef. The main chef reads it, follows it, and keeps cooking without ever stopping the service.

How It Works (The Magic Trick)

The researchers built a system to test this idea. Here is the step-by-step process they described:

  1. The Crash: The program hits an error it wasn't expecting.
  2. The Snapshot: The system takes a quick "photo" of everything happening at that exact moment: the error message, where the code broke, and what the variables (the ingredients) were doing.
  3. The Ask: This snapshot is sent to a Large Language Model (LLM). Think of the LLM as a super-smart librarian who has read every cookbook in the world. The system asks the librarian: "Here is the problem. Write a quick fix so we can keep going."
  4. The Fix: The librarian writes a tiny piece of code (the "healing code").
  5. The Restart: The system runs this new code immediately. It changes the state of the program (like swapping the pot) so the error is gone, and the program continues running as if nothing happened.

What They Found

The team tested this "AI Sous-Chef" on thousands of broken programs. Here is what happened:

  • It Works Surprisingly Well: When they used the smartest AI model available (GPT-4), it successfully fixed the program and let it keep running about 73% of the time.
  • It Gets the Job Done: In about 39% of cases, the program didn't just keep running; it actually finished the task correctly, producing the right answer.
  • Training Helps: They found that if they "taught" the AI specifically how to fix these errors (by showing it examples of good fixes), even smaller, less powerful AI models could perform almost as well as the big, expensive ones.

The Catch: Trusting the AI

The paper also points out a big risk. Because the AI is writing code on the fly, it might make a mistake.

  • The Risk: Imagine the AI Sous-Chef decides to fix the "hot oven" problem by telling the chef to "turn off the gas to the whole building." That would be a disaster.
  • The Reality: The researchers found that while the AI is good at fixing things, it sometimes does risky things, like skipping important steps or changing the wrong variables.
  • The Solution: They suggest we need "safety checks." Think of it like giving the AI Sous-Chef a list of "Safe Tools" they are allowed to use. They can swap pots or change temperatures, but they cannot touch the gas main. This keeps the kitchen safe while still allowing the AI to help.

The Bottom Line

This paper is the first step toward building software that can heal itself. Instead of waiting for a human to fix a crash, we might soon have software that uses AI to instantly patch its own holes and keep working.

However, the authors are clear: this is still a prototype. We need to make sure the AI doesn't accidentally break things while trying to fix them. But the potential is huge: software that is more resilient, less likely to crash, and able to recover from mistakes on its own.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →