Monitor tool: real-time background process streaming in Claude Code
In brief
The Monitor tool spawns a background process and streams its stdout line-by-line into the conversation without blocking Claude Code's main thread.
Contents
The Monitor tool is a Claude Code capability that spawns a background process and streams its stdout output into the conversation in real time, without blocking the main thread. Introduced in Claude Code v2.1.98 (April 9, 2026), it enables patterns like watching logs while writing code, or tailing a test runner while implementing the feature it is testing.
What it does
When you use the Monitor tool, Claude starts a subprocess — a running server, a build process, a log tail — and receives its output as a stream of notifications. Claude can act on that output: reading error messages as they appear, noticing when a server starts successfully, catching a test failure mid-run.
This is qualitatively different from running a command and waiting for it to complete. Monitor gives Claude visibility into a running process without that process blocking everything else.
Practical patterns
Watch a dev server while you code. Start your dev server with Monitor and ask Claude to fix a bug. As you make changes, Claude can see the server output — compilation errors, runtime warnings, request logs — without having to stop what it is doing and run a separate check.
Tail logs while debugging. If you are chasing a production issue and need to watch logs while making changes, Monitor lets Claude observe both simultaneously.
Gate on a process starting. "Start the database, then run the migrations when it is ready." Monitor lets Claude wait for the "ready" signal in the process output rather than guessing a sleep duration.
The design
Monitor is non-blocking because it uses a background subprocess architecture. Each line of stdout from the monitored process arrives as a notification — Claude reads it when it reads it, but the main conversation thread does not stall waiting for the process to finish or produce output.
For long-running processes (like a dev server you keep running for the duration of a session), this is the right model. The process runs; Claude monitors it; both continue independently.
When not to use Monitor
For commands you just need to run and finish — a test suite, a build, a script — the standard Bash tool is simpler. Monitor earns its value when you need ongoing visibility into a running process, not a one-shot command execution.
Further reading
- Claude Code changelog — the Monitor tool was introduced in Claude Code v2.1.98 (April 9, 2026)
- Claude Code best practices — broader guidance on using Claude Code's tool ecosystem effectively