> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mutagent.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Diagnose

> Stage ④ — root-cause the failures on evidence and rank the remedies. Failures come from Evaluate; fixes go to Optimize.

<Note>Stage ④ of the loop · owned by the **Diagnostics** skill · also on npm as [`@mutagent/diagnostics`](https://www.npmjs.com/package/@mutagent/diagnostics).</Note>

**Diagnose** takes the failures that [Evaluate](/helix/lifecycle/evaluate) flagged and finds *why*
they happened — grounded in your real traces, not guesses — then ranks the fixes.

It runs a set of **analyzer agents in parallel** across a slice of your traces; each returns findings
tied to specific runs, which Helix merges, de-duplicates, and ranks by expected impact.

## Run it

Point Helix at what's failing:

```text theme={null}
Diagnose why the Refund Processing agent keeps failing the policy check on partial refunds.
```

Other ways people ask:

* *Run a root cause analysis on the Deep Research agent's low-scoring runs and rank the fixes worth trying.*
* *Find the traces where the Refund Processing agent mis-read the dispute amount and surface the common pattern.*

## What you get

* **Root causes**, each tied to evidence from your traces.
* **Ranked remedies** — the changes most likely to move the verdict, in priority order.

Diagnose proposes; it doesn't apply. Remedies hand off to [Optimize](/helix/lifecycle/optimize),
which applies them only after you approve.

## Use it on its own

Diagnostics publishes independently as `@mutagent/diagnostics`. Point it at your agent's traces to
get evidence-grounded root causes and ranked remedies without the rest of Helix.

<Card title="Next: Optimize" icon="arrow-right" href="/helix/lifecycle/optimize">
  Apply an approved remedy and re-run the loop.
</Card>
