# Failure bundles

> For the complete documentation index, see [llms.txt](/llms.txt)

When a run fails, unotest writes a **failure bundle** — everything needed to
understand what happened, for you or the agent.

## What's captured

| Tier | Contents | Default |
| --- | --- | --- |
| **1** | error + stack, console log, semantic DOM snapshot, DSL trace | always on |
| **2** | screenshot (viewport + element-focused) | on |
| **3** | HAR (network) + video | off — **not wired yet** |

:::caution[Tier 3 is not shipped]
Network HAR and video capture aren't wired yet. Use the console + screenshot +
semantic DOM + trace. Don't promise HAR/video in your own docs or dashboards.
:::

## Where it lives

Bundles are written under `.unotest/failures/` (configurable), with retention
(default: keep 20 runs / 7 days). The [viewer](/viewer/inspector/) renders each
artifact per run; the agent reads them through the
[failure-artifact MCP tools](/reference/mcp-tools/).

## How the agent uses it

On failure the agent calls `agent_fix`, which bundles the trace, console,
semantic snapshot and scenario source plus a classification
(`rewrite-selector` / `add-waitfor` / `change-assertion`). It proposes a diff —
[you approve it](/concepts/debugging/).
