Tools · Files and code

monitor

Changes things

Run a command in the background and watch its output: each line it prints is logged as it happens. Use for logs, test watchers or anything you wait on.

When to use: Give a short description. Read the watch's log file for its lines so far; you are told when it ends. Stop it with task_stop when you no longer need it.

Example

Run for real by scripts/tool-examples.py in a small demo project, with Haiku 5.5 where the tool calls a model. The output is exactly what the tool returned, in 6s.

The call

tool call
{
  "tool": "monitor",
  "arguments": {
    "command": "python -m pytest -q -p no:cacheprovider 2>&1 | tail -2",
    "description": "the pricing tests"
  }
}

Real output

{"taskId": "job_1_32380", "timeoutMs": 300000, "persistent": false}

Parameters

NameTypeDescription
command*stringShell command; each line it prints is an event
description*stringA short description of the watch
timeout_msintegerDeadline in milliseconds (default 300000)

* required

Read, search and edit the project; run commands, code and git.