Tools · Files and code

bash_job

Changes things

Read 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 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

NameTypeDescription
job_id*stringThe job id returned by the bash tool.
actionstringoutput = read recent log; kill = stop it.outputkill
tail_linesnumberHow many trailing log lines to return (default 50).

* required

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