ClaudeCode.Message.ToolProgressMessage (ClaudeCode v0.29.0)
View SourceRepresents a tool progress message from the Claude CLI.
Emitted periodically while a tool is executing to indicate progress. Useful for showing elapsed time or progress indicators in UIs.
Fields
:tool_use_id- The tool use block ID:tool_name- Name of the executing tool:parent_tool_use_id- Parent tool use ID if in a subagent context:elapsed_time_seconds- Seconds since the tool started:task_id- Background task ID (optional):uuid- Message UUID:session_id- Session identifier
JSON Format
{
"type": "tool_progress",
"tool_use_id": "toolu_abc123",
"tool_name": "Bash",
"parent_tool_use_id": null,
"elapsed_time_seconds": 5.2,
"uuid": "...",
"session_id": "..."
}
Summary
Functions
Creates a new ToolProgressMessage from JSON data.
Type guard to check if a value is a ToolProgressMessage.
Types
Functions
Creates a new ToolProgressMessage from JSON data.
Examples
iex> ToolProgressMessage.new(%{
...> "type" => "tool_progress",
...> "tool_use_id" => "toolu_abc",
...> "tool_name" => "Bash",
...> "session_id" => "session-1"
...> })
{:ok, %ToolProgressMessage{type: :tool_progress, ...}}
iex> ToolProgressMessage.new(%{"type" => "assistant"})
{:error, :invalid_message_type}
Type guard to check if a value is a ToolProgressMessage.