pub struct TaskStartedMessage {Show 16 fields
pub session_id: String,
pub task_id: String,
pub run_id: Option<String>,
pub parent_task_id: Option<String>,
pub task_type: Option<TaskType>,
pub tool_use_id: Option<String>,
pub description: String,
pub subagent_type: Option<String>,
pub is_backgrounded: Option<bool>,
pub awaited: Option<bool>,
pub spawn_depth: Option<u32>,
pub prompt: Option<String>,
pub workflow_name: Option<String>,
pub skip_transcript: Option<bool>,
pub ambient: Option<bool>,
pub uuid: String,
}Expand description
task_started system message — emitted once when a background task begins.
Fields§
§session_id: String§task_id: String§run_id: Option<String>Id of one run of the task: equal on every task_* event and
background_tasks_changed entry of that run. A resumed task keeps its
task_id and gets a new run_id; the run ids of one task sort, by
plain string comparison, in the order the runs opened. Absent for a
task this process did not register (CLI 2.1.292+).
parent_task_id: Option<String>task_id of the subagent (local_agent) task whose agent launched
this task. Absent when the launcher is the main thread, has no
task_id of its own, or is no longer tracked. The parent may be a
foreground or already-ended task, so treat an unknown id as no parent
(CLI 2.1.292+).
task_type: Option<TaskType>§tool_use_id: Option<String>§description: String§subagent_type: Option<String>The subagent type for local_agent tasks (e.g. general-purpose,
Explore). Absent for local_bash tasks.
is_backgrounded: Option<bool>Whether the task was registered in the background (true) or in the
foreground with the spawning tool call blocking on it (false). A
later move to the background arrives as task_updated
patch.is_backgrounded. Set for local_agent and local_bash tasks
(CLI 2.1.239+).
awaited: Option<bool>True for a run of a resumed subagent (local_agent) that the tool
call which resumed it waits for, as SendMessage does when
background tasks are disabled; tool_use_id
then names that call. The run has ended by the time that call
returns, and its report goes into that call’s result, so expect no
follow-up turn when it ends. A later resume that nothing waits for
starts a new run without the field (CLI 2.1.293+).
spawn_depth: Option<u32>Nesting depth of a spawned subagent (local_agent) task: 1 for a
top-level spawn, N+1 when spawned from inside a depth-N agent. Not set
on other tasks (CLI 2.1.239+).
prompt: Option<String>The prompt handed to the subagent. Present for local_agent tasks.
workflow_name: Option<String>§skip_transcript: Option<bool>§ambient: Option<bool>True for housekeeping tasks the CLI does not surface as user work
(every skip_transcript task, plus auto-started live-update
watchers); hosts should exclude them from activity indicators
(CLI 2.1.259+).
uuid: String