---
url: https://docs.mochiexec.io/reference/cli/mochi_ai_diagnose.md
description: Diagnose a failed run and suggest fixes
---

# mochi ai diagnose

Diagnose a failed run and suggest fixes

## Synopsis

Analyzes a run's output alongside the executable definition and script that produced it, and reports the likely cause, the evidence for it, and what to try.

```shell
mochi ai diagnose <run-id> [flags]
```

## Options

| Flag | Type | Description |
|------|------|-------------|
| `-h, --help` |  | help for diagnose |
| `-o, --output` | `string` | Output format: text or json (default "text") |

## Options inherited from parent commands

| Flag | Type | Description |
|------|------|-------------|
| `-L, --log-level` | `string` | Log verbosity level (debug, info, fatal) (default "info") |
| `--sync` |  | Sync flow cache and workspaces |

## See also

* [mochi ai](mochi_ai.md) — Describe, explain, and diagnose executables with AI
