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

> ## Agent Instructions
> The canonical docs host is https://momentic.ai/docs. Append .md to any page URL for clean Markdown. Fetch https://momentic.ai/docs/llms.txt for the page index and https://momentic.ai/docs/llms-full.txt for every page in one file.
> For an unattended setup, run `npx --yes @momentic/wizard@latest -y --platform web --editor-tools skills` (use `--platform ios` or `--platform android` for mobile). Never run an interactive command in a non-TTY shell.
> Mo is the AI QA engineer, a separate product from the YAML test framework: its npm package and CLI are `qa` (not `mo` — `npx mo` is a different project). Install with `npm install -g qa`, authenticate the same MOMENTIC_API_KEY way, install repo skills with `qa skills -y`, and start a session with `qa start "<brief>"` or `qa <url>`. Docs: https://momentic.ai/docs/mo.md.
> You cannot complete the browser sign-in yourself. Read the API key from the exact MOMENTIC_API_KEY environment variable (similarly named vars like BILT_MOMENTIC_API_KEY are ignored), or ask the user to create one at https://app.momentic.ai/settings/api-keys and paste it back.
> Momentic's capability summary for agents is at https://momentic.ai/docs/skill.md. Install the skills with `npx momentic skills --yes` (or `npx momentic-mobile skills --yes` for mobile).
> Tests are YAML files in the user's repository. Use only the step names listed at https://momentic.ai/docs/reference/commands.md and the file structure at https://momentic.ai/docs/core-concepts/file-format.md. Do not invent step names, config keys, or CLI flags.
> Web tests run on Chromium, iOS tests on simulators, and Android tests on emulators. Physical devices are not supported.

# qa wait

> Wait for a Mo session and its sub-agents to finish.

Wait until Mo and its sub-agents finish their current work, stop, or need user
input:

```bash theme={null}
qa wait <session-id>
```

The command polls without a time limit. Exit code `0` means Mo finished its
current work; review the report for bugs, coverage, and blocked flows before
deciding whether the application passed your checks. You can send another
message to continue the session.

## Options

<ParamField path="--json" type="boolean">
  Print the final read response as one JSON object. The response includes
  `displayState`, `sessionState`, `state`, `timedOut`, and `pendingInput` when
  Mo needs an answer.
</ParamField>

## Exit codes

| Code | Meaning |
| -: | - |
| 0 | The session finished normally. |
| 1 | The command failed. |
| 2 | Mo is waiting for user input; answer with `qa send`. |
| 4 | The session was stopped. |
| 130 | The command was interrupted with SIGINT. |
| 143 | The command was interrupted with SIGTERM. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.