Tools · Files and code
monitor
Changes thingsRun 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": "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
| Name | Type | Description |
|---|---|---|
| command* | string | Shell command; each line it prints is an event |
| description* | string | A short description of the watch |
| timeout_ms | integer | Deadline in milliseconds (default 300000) |
* required
More in Files and code
Read, search and edit the project; run commands, code and git.