Overview
When the target app’s UI changes and runbook steps start failing,--self-heal mode runs the runbook with enhanced recovery features, classifies every failure, and generates AI-powered repair suggestions.
Self-heal mode requires Team or higher.
How self-heal works
Enhanced recovery activates
Self-heal mode automatically enables several features that are off by default in normal execution, including selector cache, Agent Fallback, Vision Fallback, increased retries (5 instead of 3), and auto-approval of confirmation prompts. See the comparison table below for a full breakdown.
Failures are classified
Each failed step is classified into one of 6 error categories. The category determines what kind of fix is most likely to resolve the issue.
AI generates repair suggestions
For each failure, AI generates two types of suggestions:
- Runbook fix — Changes to the runbook itself (updated selectors, added steps, removed steps)
- Context fix — Updates to
context.md(new page structure notes, changed navigation paths)
Self-heal vs normal execution
| Setting | Normal execution | Self-heal mode |
|---|---|---|
skipConfirmation | false | true |
enableSelectorCache | plan-dependent | true |
enableAgentFallback | plan-dependent | true |
enableVisionFallback | plan-dependent | true |
maxRetries | 3 | 5 |
| Execution strategy | Standard | Aggressive |
| AI repair suggestions | No | Yes |
| Diagnostic report | On request (--report) | Always |
Applying fixes
After reviewing the self-heal report, use thefix-runbook command to apply the suggestions:
Best practices
- Run self-heal periodically — Schedule regular self-heal runs to catch UI changes early, before they affect production workflows.
- Version control your runbooks — Keep runbooks in git so you can review and revert changes from fix-runbook.
- Review before applying — Always review AI suggestions before applying. The
fix-runbookcommand shows a diff preview for each change. - Re-execute after fixing — After applying fixes, run a normal execution to verify the runbook works correctly.