system_messages
Class info¶
Classes¶
| Name | Children | Inherits |
|---|---|---|
| APIRetrySystemMessage clawd_code_sdk.models.system_messages System message emitted when an API call fails and is retried. |
||
| BackgroundTask clawd_code_sdk.models.system_messages A background task in the background_tasks_changed snapshot. |
||
| BackgroundTasksChangedMessage clawd_code_sdk.models.system_messages Full snapshot of running background tasks, emitted whenever the set changes. |
||
| BaseSystemMessage clawd_code_sdk.models.system_messages Base class for all system messages. |
||
| CommandsChangedMessage clawd_code_sdk.models.system_messages Emitted when the set of available slash commands changes. |
||
| CompactBoundarySystemMessage clawd_code_sdk.models.system_messages System message emitted at compaction boundaries. |
||
| ControlRequestProgressMessage clawd_code_sdk.models.system_messages Progress for a long-running control request (e.g. side question). |
||
| ElicitationCompleteMessage clawd_code_sdk.models.system_messages System message emitted when an MCP elicitation completes. |
||
| FilePersistedEntry clawd_code_sdk.models.system_messages A single file that was persisted. |
||
| FilePersistedFailure clawd_code_sdk.models.system_messages A file that failed to persist. |
||
| FilesPersistedSystemMessage clawd_code_sdk.models.system_messages System message emitted when files have been persisted. |
||
| HookProgressSystemMessage clawd_code_sdk.models.system_messages Progress update from a running hook. |
||
| HookResponseSystemMessage clawd_code_sdk.models.system_messages System message emitted when a hook completes. |
||
| HookStartedSystemMessage clawd_code_sdk.models.system_messages System message emitted when a hook starts. |
||
| InformationalSystemMessage clawd_code_sdk.models.system_messages Informational text from the CLI (notices, suggestions, warnings). |
||
| InitSystemMessage clawd_code_sdk.models.system_messages System init message with session metadata. |
||
| LocalCommandOutputMessage clawd_code_sdk.models.system_messages Output from a local slash command (e.g. /voice, /cost). |
||
| McpResourceLink clawd_code_sdk.models.system_messages MCP resource link attached to a task notification. |
||
| McpServerStatus clawd_code_sdk.models.system_messages MCP server status. |
||
| Memory clawd_code_sdk.models.system_messages Agent memory. |
||
| MemoryRecallSystemMessage clawd_code_sdk.models.system_messages Emitted when the memory recall supervisor surfaces relevant memories into the turn. |
||
| MirrorErrorSystemMessage clawd_code_sdk.models.system_messages Emitted when SessionStore.append() rejects or times out for a transcript-mirror batch. |
||
| ModelRefusalFallbackMessage clawd_code_sdk.models.system_messages Emitted when a model refusal triggered a switch to a fallback model. |
||
| ModelRefusalNoFallbackMessage clawd_code_sdk.models.system_messages Emitted when the model refused and no fallback model is available. |
||
| NoResponseInfo clawd_code_sdk.models.system_messages Timing info for an API call that never responded. |
||
| NotificationSystemMessage clawd_code_sdk.models.system_messages Loop-side text notification. |
||
| Patch clawd_code_sdk.models.system_messages Patch for updating a task's status and metadata. |
||
| PermissionDeniedSystemMessage clawd_code_sdk.models.system_messages Emitted when a tool call was denied by the permission system. |
||
| Plugin clawd_code_sdk.models.system_messages Claude code plugin. |
||
| PluginError clawd_code_sdk.models.system_messages Plugin load error reported in the init message. |
||
| PluginInstallSystemMessage clawd_code_sdk.models.system_messages System message emitted when a plugin is installed. |
||
| PluginManagedLock clawd_code_sdk.models.system_messages Managed-settings lock info for a plugin that failed to load. |
||
| PreservedMessages clawd_code_sdk.models.system_messages Messages preserved verbatim across compaction. |
||
| PreservedSegment clawd_code_sdk.models.system_messages Relink info for preserved messages during compaction. |
||
| SessionKey clawd_code_sdk.models.system_messages Identifies a session transcript or subagent transcript in the store. |
||
| SessionStateChangedMessage clawd_code_sdk.models.system_messages System message emitted when session state changes. |
||
| SessionWritesLostMessage clawd_code_sdk.models.system_messages Emitted when writes were lost due to a full disk or exceeded quota. |
||
| StatusSystemMessage clawd_code_sdk.models.system_messages System status message. |
||
| TaskNotificationSystemMessage clawd_code_sdk.models.system_messages System message emitted when a subagent task completes, fails, or stops. |
||
| TaskProgressSystemMessage clawd_code_sdk.models.system_messages System message emitted periodically with task progress updates. |
||
| TaskProgressUsage clawd_code_sdk.models.system_messages Usage info for a task progress update. |
||
| TaskStartedSystemMessage clawd_code_sdk.models.system_messages System message emitted when a subagent task starts. |
||
| TaskUpdatedSystemMessage clawd_code_sdk.models.system_messages System message emitted when a subagent task was updated. |
||
| ThinkingTokensMessage clawd_code_sdk.models.system_messages Running estimate of thinking tokens for the current turn. |
||
| TriggerMetadata clawd_code_sdk.models.system_messages Trigger metadata. |
||
| WorkerShuttingDownMessage clawd_code_sdk.models.system_messages Emitted when the CLI worker is shutting down. |
🛈 DocStrings¶
System message types.
APIRetrySystemMessage
¶
Bases: BaseSystemMessage
System message emitted when an API call fails and is retried.
Source code in src/clawd_code_sdk/models/system_messages.py
no_response
class-attribute
instance-attribute
¶
no_response: NoResponseInfo | None = None
Set when the retry was triggered by the API not responding at all.
BackgroundTask
¶
Bases: TypedDict
A background task in the background_tasks_changed snapshot.
Source code in src/clawd_code_sdk/models/system_messages.py
BackgroundTasksChangedMessage
¶
Bases: BaseSystemMessage
Full snapshot of running background tasks, emitted whenever the set changes.
Source code in src/clawd_code_sdk/models/system_messages.py
BaseSystemMessage
¶
Bases: BaseModel
Base class for all system messages.
Source code in src/clawd_code_sdk/models/system_messages.py
CommandsChangedMessage
¶
Bases: BaseSystemMessage
Emitted when the set of available slash commands changes.
Source code in src/clawd_code_sdk/models/system_messages.py
CompactBoundarySystemMessage
¶
Bases: BaseSystemMessage
System message emitted at compaction boundaries.
Source code in src/clawd_code_sdk/models/system_messages.py
ControlRequestProgressMessage
¶
Bases: BaseSystemMessage
Progress for a long-running control request (e.g. side question).
Source code in src/clawd_code_sdk/models/system_messages.py
ElicitationCompleteMessage
¶
Bases: BaseSystemMessage
System message emitted when an MCP elicitation completes.
Source code in src/clawd_code_sdk/models/system_messages.py
FilePersistedEntry
¶
FilePersistedFailure
¶
FilesPersistedSystemMessage
¶
Bases: BaseSystemMessage
System message emitted when files have been persisted.
Source code in src/clawd_code_sdk/models/system_messages.py
HookProgressSystemMessage
¶
Bases: BaseSystemMessage
Progress update from a running hook.
Source code in src/clawd_code_sdk/models/system_messages.py
HookResponseSystemMessage
¶
Bases: BaseSystemMessage
System message emitted when a hook completes.
Source code in src/clawd_code_sdk/models/system_messages.py
HookStartedSystemMessage
¶
Bases: BaseSystemMessage
System message emitted when a hook starts.
Source code in src/clawd_code_sdk/models/system_messages.py
InformationalSystemMessage
¶
Bases: BaseSystemMessage
Informational text from the CLI (notices, suggestions, warnings).
Source code in src/clawd_code_sdk/models/system_messages.py
InitSystemMessage
¶
Bases: BaseSystemMessage
System init message with session metadata.
Source code in src/clawd_code_sdk/models/system_messages.py
additional_directories
class-attribute
instance-attribute
¶
Extra working directories added to the session (undocumented).
fast_mode_state
class-attribute
instance-attribute
¶
Whether fast mode was enabled.
memory_paths
class-attribute
instance-attribute
¶
Auto-memory directories by kind (undocumented).
messaging_socket_path
class-attribute
instance-attribute
¶
Path of the CLI's local messaging socket (undocumented).
original_cwd
class-attribute
instance-attribute
¶
The cwd the session was started in (undocumented).
served_by_anthropic
class-attribute
instance-attribute
¶
Whether requests are served by Anthropic directly (undocumented).
startup_timing
class-attribute
instance-attribute
¶
Startup timing diagnostics (undocumented, nested phase timings).
user_message_uuids
class-attribute
instance-attribute
¶
Client uuids of the user messages the turn takes in (undocumented, CLI 2.1.330+).
LocalCommandOutputMessage
¶
Bases: BaseSystemMessage
Output from a local slash command (e.g. /voice, /cost).
Displayed as assistant-style text in the transcript.
Source code in src/clawd_code_sdk/models/system_messages.py
McpResourceLink
¶
Bases: TypedDict
MCP resource link attached to a task notification.
Source code in src/clawd_code_sdk/models/system_messages.py
McpServerStatus
¶
Memory
¶
Bases: BaseModel
Agent memory.
Source code in src/clawd_code_sdk/models/system_messages.py
MemoryRecallSystemMessage
¶
Bases: BaseSystemMessage
Emitted when the memory recall supervisor surfaces relevant memories into the turn.
Mirrors the CLI relevant_memories attachment so SDK renderers can show "Recalled from memory" inline.
Source code in src/clawd_code_sdk/models/system_messages.py
MirrorErrorSystemMessage
¶
Bases: BaseSystemMessage
Emitted when SessionStore.append() rejects or times out for a transcript-mirror batch.
The batch is dropped (at-most-once delivery); this surfaces the failure so consumers are not silent on data loss.
Source code in src/clawd_code_sdk/models/system_messages.py
ModelRefusalFallbackMessage
¶
Bases: BaseSystemMessage
Emitted when a model refusal triggered a switch to a fallback model.
Source code in src/clawd_code_sdk/models/system_messages.py
ModelRefusalNoFallbackMessage
¶
Bases: BaseSystemMessage
Emitted when the model refused and no fallback model is available.
Source code in src/clawd_code_sdk/models/system_messages.py
NoResponseInfo
¶
NotificationSystemMessage
¶
Bases: BaseSystemMessage
Loop-side text notification.
Mirrors the interactive REPL notification queue (key/priority/timeout). JSX notifications are not emitted on this channel.
Source code in src/clawd_code_sdk/models/system_messages.py
Patch
¶
Bases: BaseModel
Patch for updating a task's status and metadata.
Source code in src/clawd_code_sdk/models/system_messages.py
PermissionDeniedSystemMessage
¶
Bases: BaseSystemMessage
Emitted when a tool call was denied by the permission system.
Source code in src/clawd_code_sdk/models/system_messages.py
Plugin
¶
PluginError
¶
Bases: TypedDict
Plugin load error reported in the init message.
Source code in src/clawd_code_sdk/models/system_messages.py
PluginInstallSystemMessage
¶
Bases: BaseSystemMessage
System message emitted when a plugin is installed.
Source code in src/clawd_code_sdk/models/system_messages.py
PluginManagedLock
¶
Bases: TypedDict
Managed-settings lock info for a plugin that failed to load.
Source code in src/clawd_code_sdk/models/system_messages.py
PreservedMessages
¶
PreservedSegment
¶
SessionKey
¶
Bases: TypedDict
Identifies a session transcript or subagent transcript in the store.
Source code in src/clawd_code_sdk/models/system_messages.py
SessionStateChangedMessage
¶
Bases: BaseSystemMessage
System message emitted when session state changes.
'idle' fires after heldBackResult flushes and the bg-agent do-while exits — authoritative turn-over signal.
Source code in src/clawd_code_sdk/models/system_messages.py
SessionWritesLostMessage
¶
Bases: BaseSystemMessage
Emitted when writes were lost due to a full disk or exceeded quota.
Source code in src/clawd_code_sdk/models/system_messages.py
StatusSystemMessage
¶
Bases: BaseSystemMessage
System status message.
Source code in src/clawd_code_sdk/models/system_messages.py
user_message_uuids
class-attribute
instance-attribute
¶
Client uuids of the user messages the turn takes in (undocumented, CLI 2.1.330+).
TaskNotificationSystemMessage
¶
Bases: BaseSystemMessage
System message emitted when a subagent task completes, fails, or stops.
Source code in src/clawd_code_sdk/models/system_messages.py
skip_transcript
class-attribute
instance-attribute
¶
Whether to skip this message in the transcript.
TaskProgressSystemMessage
¶
Bases: BaseSystemMessage
System message emitted periodically with task progress updates.
Source code in src/clawd_code_sdk/models/system_messages.py
summary
class-attribute
instance-attribute
¶
AI-generated progress summary when agentProgressSummaries is enabled.
TaskProgressUsage
¶
TaskStartedSystemMessage
¶
Bases: BaseSystemMessage
System message emitted when a subagent task starts.
Source code in src/clawd_code_sdk/models/system_messages.py
TaskUpdatedSystemMessage
¶
Bases: BaseSystemMessage
System message emitted when a subagent task was updated.
Source code in src/clawd_code_sdk/models/system_messages.py
ThinkingTokensMessage
¶
Bases: BaseSystemMessage
Running estimate of thinking tokens for the current turn.
Source code in src/clawd_code_sdk/models/system_messages.py
TriggerMetadata
¶
Bases: TypedDict
Trigger metadata.
Source code in src/clawd_code_sdk/models/system_messages.py
WorkerShuttingDownMessage
¶
Bases: BaseSystemMessage
Emitted when the CLI worker is shutting down.