---
url: https://docs.mochiexec.io/reference/cli/mochi_ai_chat.md
description: Ask AI about your workspaces, executables, and runs
---

# mochi ai chat

Ask AI about your workspaces, executables, and runs

## Synopsis

Asks your AI provider a question. It can look up your workspaces, executables, and run logs, and with your approval edit files or run tasks; `mochi ai config set tools` sets how far it may go.

In a terminal, Mochi asks before anything that needs approval. With --output json, it stops instead and returns a `pending` result: continue with --resume-messages (the result's `messages`) and one --resume-decision per pending call.

```shell
mochi ai chat [prompt] [flags]
```

## Options

| Flag | Type | Description |
|------|------|-------------|
| `-h, --help` |  | help for chat |
| `-o, --output` | `string` | Output format: text, json, or ndjson (json with a line per progress event) (default "text") |
| `--resume-decision` | `stringArray` | Approve or deny a pending call, as \<toolCallId>=approve|deny (repeatable) |
| `--resume-messages` | `string` | Continue a paused answer from this messages file, or - for stdin |

## 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
