pub struct BackgroundTaskInfo {
pub task_id: String,
pub run_id: Option<String>,
pub task_type: String,
pub subagent_type: Option<String>,
pub description: String,
pub parent_task_id: Option<String>,
pub ambient: Option<bool>,
pub awaited: Option<bool>,
pub off_host: Option<bool>,
pub tool_use_id: Option<String>,
}Fields§
§task_id: String§run_id: Option<String>Id of the task’s current run; see TaskStartedMessage::run_id
(CLI 2.1.292+).
task_type: String§subagent_type: Option<String>Agent type of a local_agent task, such as general-purpose or a
custom agent’s name; main-session for a backgrounded main session.
Not set on other tasks (CLI 2.1.293+).
description: String§parent_task_id: Option<String>task_id of the subagent task that launched this one; see
TaskStartedMessage::parent_task_id (CLI 2.1.292+).
ambient: Option<bool>True for housekeeping tasks the CLI does not surface as user work; hosts should exclude them from activity indicators (CLI 2.1.259+).
awaited: Option<bool>True for an awaited run of a resumed subagent; see
TaskStartedMessage::awaited (CLI 2.1.293+).
off_host: Option<bool>True for a task whose work goes on outside this process: show the
task as running, but a host need not stay up for it. Marked
@internal upstream (CLI 2.1.323+).
tool_use_id: Option<String>The same id as on the task’s task_notification. Set only beside
off_host, since such a task may have no
task_started. For a script’s call it names no tool_use block.
Marked @internal upstream (CLI 2.1.330+).