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

# Monitor

> The agent watches a long-running command in the background and reacts as stdout arrives, line by line.

> [!NOTE]
>
> **Early Access.** Commands and behavior can change between releases.

`Monitor` is a tool, not a command: the model uses it when you ask it to watch something, such as
a dev server, a build, a log file or a flaky test loop. The command runs in the background, and each
stdout line arrives as a notification while the model keeps working. So "start the server and tell
me when it errors" is one instruction.

```
watch the dev server with stderr redirected to stdout (2>&1), and fix the first exception that appears
```

```
● Monitor(tick loop)
  ⎿  Monitor started — id mon-1 · "tick loop"
```

A watch ends when the process exits, when it times out (5 minutes by default, up to an hour), when
the agent cancels it, or when stdout floods (more than 200 lines in 10 seconds). For a log tail or
anything else that should keep going, ask for a watch that lasts the whole session. It has no
timeout, and still ends when the process exits, floods or the session closes.

Ask the agent what it's watching: it can list, inspect or cancel running watches. Inspecting a
watch shows how many lines it has sent, so you can spot a missing notification. Monitor shows in
the transcript like any built-in tool, and sub-agents can use it too.

> [!NOTE]
>
> `Monitor` watches processes. It is not the orchestrator's `/monitor` command, which watches
> deployments. To watch a process, just ask in plain words.

## Include errors written to stderr

Only **stdout** lines become notifications and count toward the flood limit. Stderr is logged, not
sent. If the command writes errors to stderr and you want the agent to react to them, redirect
stderr into stdout when you start the watch, for example `bun run dev 2>&1`.

## Inspect a finished watch

The agent uses `Jobs` to list, inspect or cancel watches. The last 20 finished watches keep their
exit details, so a result is still there after its notification scrolls past. Notifications that
arrive while the model is busy are grouped and delivered together next.

`Monitor` works in normal Architech and agent sessions, including sub-agents. Prime has no
`Monitor` or `Jobs`; it uses its own code-based process tools.


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