task_id and status: "running" instead of blocking until completion.
Configuring Background Mode
Thebackground_mode parameter controls when a runnable executes asynchronously:
"never"(default) — always runs synchronously"always"— always runs in the background"auto"— the LLM decides per call by settingrun_in_background=Trueon the tool input
Bash tool uses background_mode="auto" by default. The model can run a shell command in the background by passing run_in_background=True.
Checking Task Status
Background tools return immediately with a task handle:get_background_task tool. Call it with the task_id to poll status and drain queued events:
get_background_task in its tool list and can call it with the task_id from the earlier tool result.