ClaudeCode.Message.SystemMessage.TaskStarted (ClaudeCode v0.36.3)
View SourceRepresents a task started system message from the Claude CLI.
Emitted when a background task begins execution.
Fields
:type- Always:system:subtype- Always:task_started:task_id- Unique identifier for the task:tool_use_id- Associated tool use block ID (optional):description- Human-readable description of the task:task_type- Type classification of the task (optional):prompt- The prompt or instruction that started the task (optional):uuid- Message UUID:session_id- Session identifier
JSON Format
{
"type": "system",
"subtype": "task_started",
"task_id": "task_abc123",
"tool_use_id": "toolu_abc123",
"description": "Running background analysis",
"task_type": "background",
"uuid": "...",
"session_id": "..."
}
Summary
Functions
Creates a new TaskStarted from JSON data.
Type guard to check if a value is a TaskStarted.
Types
Functions
Creates a new TaskStarted from JSON data.
Examples
iex> TaskStarted.new(%{
...> "type" => "system",
...> "subtype" => "task_started",
...> "task_id" => "task_abc",
...> "session_id" => "session-1"
...> })
{:ok, %TaskStarted{type: :system, subtype: :task_started, ...}}
iex> TaskStarted.new(%{"type" => "assistant"})
{:error, :invalid_message_type}
Type guard to check if a value is a TaskStarted.