---
title: "Self-healing execution"
description: "See how agent-qa recovers from failed actions: observe the current screen, plan another route, and verify the original outcome while preserving the run trace."
canonical_url: "https://vostride.com/docs/agent-qa/self-healing"
md_url: "https://vostride.com/docs/agent-qa/self-healing.md"
last_updated: "2026-10-07T14:33:27+05:30"
---

> [Documentation index](https://vostride.com/docs.md) · [Site index](https://vostride.com/llms.txt)
> Follow the Markdown links to read individual pages; the indexes list the available documentation.

# Self-healing execution

> See how agent-qa recovers from failed actions: observe the current screen, plan another route, and verify the original outcome while preserving the run trace.

When an action fails, agent-qa re-observes the current screen and plans another way to complete the step. The expected outcome remains the same. A different route can recover the run; a different requirement cannot.

This illustrative demo shows both cases: the agent dismisses a late notice and runs the requested twelve tests, then refuses a partial run when only eight are available.

## Recover the path
The execution loop observes, plans, executes, and verifies. When a sub-action fails, the next attempt includes that failure context and the current application state. This lets the agent respond to a changed layout or an obstructing overlay instead of repeating the same click blindly.

A healed result retains the failed action and subsequent attempts in the run trace. Use the [dashboard](https://vostride.com/docs/agent-qa/dashboard.md) to inspect the reasoning, screenshots, and final outcome.

## Preserve the expectation
A test asking for all twelve tests to run is not satisfied by running eight. If the requested behavior is unavailable, the run should report that failure. Healing does not rewrite a test or weaken its assertions.

Write explicit outcomes in your [test steps](https://vostride.com/docs/agent-qa/guides/first-test.md#write-steps-in-plain-language), so recovery has a clear goal to preserve.

## Set the attempt budget
Use `use.healing.maxAttempts` to override the self-healing retry budget for a test:

```yaml
use:
  healing:
    maxAttempts: 1
```

The value is inherited when you do not override it. See the [test configuration reference](https://vostride.com/docs/agent-qa/configuration/test.md#usehealingmaxattempts) for this setting and the separate step retry and timeout controls.

## Healing and improvement
Self-healing happens during execution. [Self-improvement](https://vostride.com/docs/agent-qa/memory/curator.md) reviews completed runs to propose useful knowledge for later ones. Both depend on evidence; inspect the original failure and the verified result when diagnosing a run.

## Documentation navigation

- [All documentation](https://vostride.com/docs.md)
- Parent: [What is agent-qa](https://vostride.com/docs/agent-qa.md)
- Previous: [Built for humans and agents](https://vostride.com/docs/agent-qa/humans-and-agents.md)
- Next: [Memory overview](https://vostride.com/docs/agent-qa/memory.md)
