ClaudeCode.Message.SystemMessage.Status (ClaudeCode v0.36.3)

View Source

Represents a status message from the Claude CLI.

Emitted when the CLI transitions between processing states, such as thinking, tool use, or other activity phases.

Fields

  • :status - The current status string (e.g., "thinking", "tool_use")
  • :permission_mode - The current permission mode (optional)
  • :uuid - Message UUID
  • :session_id - Session identifier

JSON Format

{
  "type": "system",
  "subtype": "status",
  "status": "thinking",
  "permissionMode": "default",
  "uuid": "...",
  "session_id": "..."
}

Summary

Functions

Creates a new Status from JSON data.

Type guard to check if a value is a Status.

Types

t()

@type t() :: %ClaudeCode.Message.SystemMessage.Status{
  permission_mode: atom() | nil,
  session_id: String.t(),
  status: String.t(),
  subtype: :status,
  type: :system,
  uuid: String.t() | nil
}

Functions

new(json)

@spec new(map()) :: {:ok, t()} | {:error, atom()}

Creates a new Status from JSON data.

Examples

iex> Status.new(%{
...>   "type" => "system",
...>   "subtype" => "status",
...>   "status" => "thinking",
...>   "session_id" => "session-1"
...> })
{:ok, %Status{type: :system, subtype: :status, ...}}

iex> Status.new(%{"type" => "assistant"})
{:error, :invalid_message_type}

status?(arg1)

@spec status?(any()) :: boolean()

Type guard to check if a value is a Status.