Tools · Files and code
bash_job
Changes thingsRead output from, or kill, a background command started by the bash tool. Pass the job_id the bash tool returned.
When to use: After starting a background command with the bash tool in background mode, use this to check on it: the output action reads recent log lines, the kill action stops 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 2s.
The call
{
"tool": "bash_job",
"arguments": {
"job_id": "job_1_25613",
"action": "status"
}
}Real output
Job job_1_25613 is exited (0). Recent output: done
Parameters
| Name | Type | Description |
|---|---|---|
| job_id* | string | The job id returned by the bash tool. |
| action | string | output = read recent log; kill = stop it.outputkill |
| tail_lines | number | How many trailing log lines to return (default 50). |
* required
More in Files and code
Read, search and edit the project; run commands, code and git.