It reads logs and health checks, finds the cause, takes only allowed actions and checks its own fix. It catches data problems that a healthy-looking site hides, and when no tool can fix the cause it stops and writes an incident ticket instead of guessing.
Each fault is injected into a running Docker stack, then each method tries to recover it. Cells show recovered runs over total runs.
| Fault | Naive restart | Fixed runbook | Mend agent |
|---|
The results file keeps only the latest run per configuration, so the first four runs (before the frozen-process fix) are listed in full here, followed by the runs after it.
| Run | Fault | Result | Actions (wrong) | Time | Tokens |
|---|---|---|---|---|---|
| 1 | Backend hangs | failed, never acted | 0 (0) | 213 s | 38,697 |
| 2 | Backend hangs | failed, restarted the wrong service | 1 (1) | 204 s | 32,539 |
| 3 | Backend hangs | recovered, after two wrong actions | 3 (2) | 80 s | 31,353 |
| 4 | Hang with exhausted pool | recovered | 2 (0) | 183 s | 32,493 |
| 5 to 9 | Backend hangs, after the fix | recovered in 5 of 5 | 1 (0) each | 9 to 11 s | about 6,800 |
| 10 to 12 | Hang with exhausted pool, after the fix | recovered in 3 of 3 | 2 (0) each | 33 to 47 s | 16,700 to 21,600 |
Service status, logs, health and readiness, metrics, database status and config changes. Tool output is wrapped as untrusted text, so a log line cannot give the agent orders.
Only allowlisted actions run. The agent has 12 steps and 4 actions, and the last two steps are reserved for acting and verifying.
Recovered means the site is ready and the data is clean. For silent data problems a healthy page is not enough, so the agent compares the intake journal with the orders and payments tables.
If the cause is outside what the tools can change, the agent writes a ticket with findings, what it tried and a recommendation, then stops without taking more actions.