control
Class info¶
Classes¶
| Name | Children | Inherits |
|---|---|---|
| AppliedSettings clawd_code_sdk.models.control The currently applied model and effort settings. |
||
| ClaudeOAuthWaitForCompletionResponse clawd_code_sdk.models.control Response from waiting for a Claude OAuth flow to complete. |
||
| ControlErrorResponse clawd_code_sdk.models.control Control Error response. |
||
| ControlResponse clawd_code_sdk.models.control Control response. |
||
| GetSettingsResponse clawd_code_sdk.models.control Response from get_settings() containing effective and per-source settings. |
||
| McpAuthenticateResponse clawd_code_sdk.models.control Response from authenticating with an MCP server. |
||
| McpResourceContents clawd_code_sdk.models.control A single resource content entry. |
||
| PluginInfo clawd_code_sdk.models.control Information about a loaded plugin. |
||
| ReloadPluginsCacheImpact clawd_code_sdk.models.control How a reload would change the session's tool list. |
||
| RemoteControlResponse clawd_code_sdk.models.control Response from enabling remote control. |
||
| SDKControlApplyFlagSettingsRequest clawd_code_sdk.models.control SDK control apply flag settings request. |
||
| SDKControlBackgroundTasksRequest clawd_code_sdk.models.control Moves running foreground tasks (or one tool use) to the background. |
||
| SDKControlCancelAsyncMessageRequest clawd_code_sdk.models.control Drops a pending async user message from the command queue by uuid. |
||
| SDKControlCancelRequest clawd_code_sdk.models.control Cancels a currently open control request. |
||
| SDKControlChannelEnableRequest clawd_code_sdk.models.control Enables MCP channel notifications for a marketplace plugin server. |
||
| SDKControlClaudeOAuthWaitForCompletionRequest clawd_code_sdk.models.control Waits for an in-progress Claude OAuth flow to complete. |
||
| SDKControlElicitationRequest clawd_code_sdk.models.control Requests the SDK consumer to handle an MCP elicitation (user input request). |
||
| SDKControlEndSessionRequest clawd_code_sdk.models.control Ends the current session. |
||
| SDKControlFileSuggestionsRequest clawd_code_sdk.models.control Requests at-mention file autocomplete suggestions for a partial path prefix. |
||
| SDKControlGenerateSessionTitleRequest clawd_code_sdk.models.control Generates a title for a session from a description of it. |
||
| SDKControlGetBinaryVersionRequest clawd_code_sdk.models.control Requests the version of the running Claude Code binary. |
||
| SDKControlGetContextUsageRequest clawd_code_sdk.models.control Requests a breakdown of current context window usage by category. |
||
| SDKControlGetHooksListingRequest clawd_code_sdk.models.control Requests the listing of configured hooks (same data as /hooks). |
||
| SDKControlGetSessionCostRequest clawd_code_sdk.models.control Requests the formatted session cost summary (the same text as /usage). |
||
| SDKControlGetSettingsRequest clawd_code_sdk.models.control Returns the effective merged settings and the raw per-source settings. |
||
| SDKControlGetTaskOutputRequest clawd_code_sdk.models.control Reads the output collected so far for a background task. |
||
| SDKControlGetTaskOutputResponse clawd_code_sdk.models.control Output of a background task. |
||
| SDKControlGetUsageRequest clawd_code_sdk.models.control Requests the structured usage report (session cost + rate limits). Experimental. |
||
| SDKControlGetUsageResponse clawd_code_sdk.models.control Structured /usage data: session totals and plan rate-limit windows. Experimental. |
||
| SDKControlInitializeRequest clawd_code_sdk.models.control SDK control initialize request. |
||
| SDKControlInterruptRequest clawd_code_sdk.models.control SDK control interrupt request. |
||
| SDKControlInterruptResponse clawd_code_sdk.models.control Response to an interrupt request. |
||
| SDKControlListModelsRequest clawd_code_sdk.models.control Requests the list of available models. |
||
| SDKControlListPermissionRulesRequest clawd_code_sdk.models.control Lists the effective permission rules. |
||
| SDKControlMcpAuthenticateRequest clawd_code_sdk.models.control Authenticates with an MCP server. |
||
| SDKControlMcpCallRequest clawd_code_sdk.models.control Invokes an MCP tool via the subprocess MCP client without a model turn. |
||
| SDKControlMcpClearAuthRequest clawd_code_sdk.models.control Clears authentication for an MCP server. |
||
| SDKControlMcpMessageRequest clawd_code_sdk.models.control SDK control MCP message request. |
||
| SDKControlMcpOAuthCallbackUrlRequest clawd_code_sdk.models.control Provides an OAuth redirect callback URL to complete an MCP server OAuth flow. |
||
| SDKControlMcpReadResourceRequest clawd_code_sdk.models.control Reads a resource from a connected MCP server. |
||
| SDKControlMcpReadResourceResponse clawd_code_sdk.models.control Contents of an MCP resource. |
||
| SDKControlMcpReconnectRequest clawd_code_sdk.models.control Reconnects a disconnected or failed MCP server. |
||
| SDKControlMcpSetServersRequest clawd_code_sdk.models.control Replaces the set of dynamically managed MCP servers. |
||
| SDKControlMcpStatusRequest clawd_code_sdk.models.control Requests the current status of all MCP server connections. |
||
| SDKControlMcpToggleRequest clawd_code_sdk.models.control Enables or disables an MCP server. |
||
| SDKControlPermissionRequest clawd_code_sdk.models.control SDK control permission request. |
||
| SDKControlReadFileRequest clawd_code_sdk.models.control Read a file from the session filesystem for the remote sidebar viewer. |
||
| SDKControlReadFileResponse clawd_code_sdk.models.control File contents for the remote sidebar viewer. |
||
| SDKControlRegisterRepoRootRequest clawd_code_sdk.models.control Registers an additional repository root (like /add-dir). |
||
| SDKControlReloadOutputStylesRequest clawd_code_sdk.models.control Re-scans output styles from disk. |
||
| SDKControlReloadOutputStylesResponse clawd_code_sdk.models.control Output styles after reload. |
||
| SDKControlReloadPluginsRequest clawd_code_sdk.models.control Reloads plugins from disk and returns the refreshed session components. |
||
| SDKControlReloadPluginsResponse clawd_code_sdk.models.control Refreshed commands, agents, plugins, and MCP server status after reload. |
||
| SDKControlReloadSkillsRequest clawd_code_sdk.models.control Re-scans skills from disk. |
||
| SDKControlReloadSkillsResponse clawd_code_sdk.models.control Skills after reload. |
||
| SDKControlRemoteControlRequest clawd_code_sdk.models.control Toggles the remote control REPL bridge for external session access. |
||
| SDKControlRenameSessionRequest clawd_code_sdk.models.control Sets the user-facing title for the current session. |
||
| SDKControlRequest clawd_code_sdk.models.control SDK control request. |
||
| SDKControlRequestUserDialogRequest clawd_code_sdk.models.control Requests the SDK consumer to render a tool-driven blocking dialog + return user choice. |
||
| SDKControlResponse clawd_code_sdk.models.control SDK Control response. |
||
| SDKControlRewindFilesRequest clawd_code_sdk.models.control SDK control rewind files request. |
||
| SDKControlSeedReadStateRequest clawd_code_sdk.models.control Seeds the readFileState cache with a path+mtime entry. |
||
| SDKControlSetColorRequest clawd_code_sdk.models.control Sets the session accent color. Accepts an agent color name or "default" to reset. |
||
| SDKControlSetHasSubscribersRequest clawd_code_sdk.models.control Tells the CLI whether anyone is watching the session output. |
||
| SDKControlSetMaxThinkingTokensRequest clawd_code_sdk.models.control Sets the maximum number of thinking tokens for extended thinking. |
||
| SDKControlSetModelRequest clawd_code_sdk.models.control Sets the model to use for subsequent conversation turns. |
||
| SDKControlSetPermissionModeRequest clawd_code_sdk.models.control SDK control set permission mode request. |
||
| SDKControlSetPermissionModeResponse clawd_code_sdk.models.control Response to a set_permission_mode request. |
||
| SDKControlSetProactiveRequest clawd_code_sdk.models.control Sets proactive mode configuration. |
||
| SDKControlSideQuestionRequest clawd_code_sdk.models.control Sends a side question to the model using the current conversation context. |
||
| SDKControlStopTaskRequest clawd_code_sdk.models.control SDK control stop task request. |
||
| SDKControlUpdateSettingsRequest clawd_code_sdk.models.control Writes settings to the local or user settings file. |
||
| SDKHookCallbackRequest clawd_code_sdk.models.control SDK hook callback request. |
||
| SdkMcpServerManifest clawd_code_sdk.models.control An in-process MCP server's handshake output, verbatim (``sdkMcpServerManifests``). |
||
| SettingsSource clawd_code_sdk.models.control A single settings source with its raw settings. |
||
| SideQuestionResponse clawd_code_sdk.models.control Response from a side question. |
🛈 DocStrings¶
SDK control protocol types.
AppliedSettings
¶
Bases: BaseModel
The currently applied model and effort settings.
Source code in src/clawd_code_sdk/models/control.py
ClaudeOAuthWaitForCompletionResponse
¶
Bases: ClaudeCodeBaseModel
Response from waiting for a Claude OAuth flow to complete.
Source code in src/clawd_code_sdk/models/control.py
ControlErrorResponse
¶
ControlResponse
¶
GetSettingsResponse
¶
Bases: BaseModel
Response from get_settings() containing effective and per-source settings.
Source code in src/clawd_code_sdk/models/control.py
effective
instance-attribute
¶
The merged effective settings (ClaudeCodeSettings shape, camelCase keys).
McpAuthenticateResponse
¶
Bases: ClaudeCodeBaseModel
Response from authenticating with an MCP server.
Source code in src/clawd_code_sdk/models/control.py
McpResourceContents
¶
Bases: BaseModel
A single resource content entry.
Source code in src/clawd_code_sdk/models/control.py
PluginInfo
¶
ReloadPluginsCacheImpact
¶
Bases: BaseModel
How a reload would change the session's tool list.
Source code in src/clawd_code_sdk/models/control.py
RemoteControlResponse
¶
Bases: BaseModel
Response from enabling remote control.
Contains the URLs and identifiers needed for remote clients to connect to the session.
Source code in src/clawd_code_sdk/models/control.py
SDKControlApplyFlagSettingsRequest
¶
Bases: _ControlBase
SDK control apply flag settings request.
Source code in src/clawd_code_sdk/models/control.py
SDKControlBackgroundTasksRequest
¶
Bases: _ControlBase
Moves running foreground tasks (or one tool use) to the background.
Source code in src/clawd_code_sdk/models/control.py
SDKControlCancelAsyncMessageRequest
¶
Bases: _ControlBase
Drops a pending async user message from the command queue by uuid.
Source code in src/clawd_code_sdk/models/control.py
SDKControlCancelRequest
¶
SDKControlChannelEnableRequest
¶
Bases: _ControlBase
Enables MCP channel notifications for a marketplace plugin server.
Source code in src/clawd_code_sdk/models/control.py
SDKControlClaudeOAuthWaitForCompletionRequest
¶
Bases: _ControlBase
Waits for an in-progress Claude OAuth flow to complete.
Unlike claude_oauth_callback, this does not provide an authorization
code — it simply waits for the existing OAuth flow (started by
claude_authenticate) to finish. The response contains the
authenticated account details.
Source code in src/clawd_code_sdk/models/control.py
SDKControlElicitationRequest
¶
Bases: _ControlBase
Requests the SDK consumer to handle an MCP elicitation (user input request).
Source code in src/clawd_code_sdk/models/control.py
499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 | |
description
class-attribute
instance-attribute
¶
Permission-display description from _meta['anthropic/permissionDisplay'].description.
display_name
class-attribute
instance-attribute
¶
Short tool/server label from _meta['anthropic/permissionDisplay'].displayName.
elicitation_id
class-attribute
instance-attribute
¶
Elicitation ID for correlating URL elicitations with completion notifications.
mcp_server_name
instance-attribute
¶
Name of the MCP server requesting elicitation.
mode
class-attribute
instance-attribute
¶
Elicitation mode: 'form' for structured input, 'url' for browser-based auth.
requested_schema
class-attribute
instance-attribute
¶
JSON Schema for the requested input (only for 'form' mode).
title
class-attribute
instance-attribute
¶
Permission-display title from the MCP server's _meta['anthropic/permissionDisplay'].
Mirrors can_use_tool.title so SDK consumers can render elicitation-driven permission prompts
with structured headers instead of parsing message.
from_mcp
classmethod
¶
from_mcp(params: ElicitRequestParams, mcp_server_name: str) -> SDKControlElicitationRequest
Create from MCP elicitation request params (mcp 1.x or 2.x).
Source code in src/clawd_code_sdk/models/control.py
to_mcp
¶
Convert to the corresponding MCP elicitation request params.
Built from the wire format (camelCase keys, _meta), which both
mcp 1.x and 2.x accept, so this works on either major.
Source code in src/clawd_code_sdk/models/control.py
SDKControlEndSessionRequest
¶
SDKControlFileSuggestionsRequest
¶
Bases: _ControlBase
Requests at-mention file autocomplete suggestions for a partial path prefix.
Returns the same fuzzy-matched results the TUI shows.
Source code in src/clawd_code_sdk/models/control.py
SDKControlGenerateSessionTitleRequest
¶
Bases: _ControlBase
Generates a title for a session from a description of it.
Source code in src/clawd_code_sdk/models/control.py
description
instance-attribute
¶
Text to title, e.g. the conversation's latest user and assistant text.
persist
class-attribute
instance-attribute
¶
Store the title as the current session's title. A session that has one already (the CLI titles new sessions itself) returns it instead of generating another.
SDKControlGetBinaryVersionRequest
¶
Bases: _ControlBase
Requests the version of the running Claude Code binary.
Source code in src/clawd_code_sdk/models/control.py
SDKControlGetContextUsageRequest
¶
Bases: _ControlBase
Requests a breakdown of current context window usage by category.
Source code in src/clawd_code_sdk/models/control.py
SDKControlGetHooksListingRequest
¶
Bases: _ControlBase
Requests the listing of configured hooks (same data as /hooks).
Source code in src/clawd_code_sdk/models/control.py
SDKControlGetSessionCostRequest
¶
Bases: _ControlBase
Requests the formatted session cost summary (the same text as /usage).
Source code in src/clawd_code_sdk/models/control.py
SDKControlGetSettingsRequest
¶
Bases: _ControlBase
Returns the effective merged settings and the raw per-source settings.
Source code in src/clawd_code_sdk/models/control.py
SDKControlGetTaskOutputRequest
¶
Bases: _ControlBase
Reads the output collected so far for a background task.
Source code in src/clawd_code_sdk/models/control.py
SDKControlGetTaskOutputResponse
¶
SDKControlGetUsageRequest
¶
Bases: _ControlBase
Requests the structured usage report (session cost + rate limits). Experimental.
Source code in src/clawd_code_sdk/models/control.py
SDKControlGetUsageResponse
¶
Bases: ClaudeCodeBaseModel
Structured /usage data: session totals and plan rate-limit windows. Experimental.
Source code in src/clawd_code_sdk/models/control.py
behaviors
class-attribute
instance-attribute
¶
What contributes to usage, from a scan of local transcripts (None if skipped).
rate_limits_available
instance-attribute
¶
False when plan limits do not apply (API key, Bedrock, Vertex, ...).
session
instance-attribute
¶
session: UsageReportSession
Cost and usage accumulated by the current session.
subscription_type
instance-attribute
¶
claude.ai plan (e.g. "pro", "max"), None without a subscription.
SDKControlInitializeRequest
¶
Bases: _ControlBase
SDK control initialize request.
Source code in src/clawd_code_sdk/models/control.py
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 | |
exclude_dynamic_sections
class-attribute
instance-attribute
¶
exclude_dynamic_sections: bool | None = Field(
default=None, serialization_alias="excludeDynamicSections"
)
When true, omit per-user dynamic sections from the cached system prompt.
Omits info like working directory, auto-memory path and re-inject them as the first usermessage. Lets cross-user prompt caching hit on a static system prompt prefix. Tradeoff: the model sees this context slightly later in the prompt, so steering on the working directory and memory location is marginally less authoritative. Has no effect when a custom (non-preset) system prompt is in use.
mcp_servers
class-attribute
instance-attribute
¶
mcp_servers: dict[str, dict[str, Any]] | None = Field(
default=None, serialization_alias="mcpServers"
)
Servers for Claude Code to run or connect to, as one --mcp-config item would hold
them; read only at launch under --await-initialize (mcp_servers_applied).
plan_mode_instructions
class-attribute
instance-attribute
¶
plan_mode_instructions: str | None = Field(default=None, serialization_alias="planModeInstructions")
Custom workflow body for the plan-mode system reminder.
plugins
class-attribute
instance-attribute
¶
Plugins to load at launch (plugin_delivery="initialize", --await-initialize).
sdk_mcp_server_configs
class-attribute
instance-attribute
¶
sdk_mcp_server_configs: dict[str, dict[str, Any]] | None = Field(
default=None, serialization_alias="sdkMcpServerConfigs"
)
Settings of the in-process servers in sdk_mcp_servers, by name: timeout (ms per
tool call, when first registered) and tools (per-tool permission policy).
sdk_mcp_server_manifests
class-attribute
instance-attribute
¶
sdk_mcp_server_manifests: dict[str, SdkMcpServerManifest] | None = Field(
default=None, serialization_alias="sdkMcpServerManifests"
)
The in-process servers' handshake results, captured by the host (a one-shot cache
for the connect that follows; sdk_mcp_manifests_parked reports each entry).
sdk_mcp_server_manifests_origin
class-attribute
instance-attribute
¶
sdk_mcp_server_manifests_origin: Literal["host_per_send"] | None = Field(
default=None, serialization_alias="sdkMcpServerManifestsOrigin"
)
That the manifests were captured for this send (only needed over a remote session transport; the CLI's own stdio transport needs no marker).
skills
class-attribute
instance-attribute
¶
When provided, only given skills are loaded into the main session system prompt.
Uses the same rules as AgentDefinition.skills: exact name, plugin-qualified name, or ":name" suffix. Omit to load every discovered skill. Applies to the main session only; subagents use AgentDefinition.skills.
title
class-attribute
instance-attribute
¶
Custom session title.
When provided, the session uses this title and skips automatic title generation. Has no effect on the persisted title when resuming an existing session.
SDKControlInterruptRequest
¶
Bases: _ControlBase
SDK control interrupt request.
Source code in src/clawd_code_sdk/models/control.py
cancel_queued
class-attribute
instance-attribute
¶
Also cancel queued (not yet started) user messages.
SDKControlInterruptResponse
¶
Bases: BaseModel
Response to an interrupt request.
Source code in src/clawd_code_sdk/models/control.py
SDKControlListModelsRequest
¶
SDKControlListPermissionRulesRequest
¶
SDKControlMcpAuthenticateRequest
¶
SDKControlMcpCallRequest
¶
Bases: _ControlBase
Invokes an MCP tool via the subprocess MCP client without a model turn.
No permission check (control channel is trusted, same as other subtypes). SDK-type MCP servers (config.type === "sdk") are rejected — they are caller-provided, so the caller can invoke them directly without the subprocess round-trip. Result content passes through the same processing as model-turn MCP calls. Session expiry is not retried automatically; callers can mcp_reconnect and retry. UrlElicitationRequired (-32042) tries Elicitation hooks; if no hook resolves, the call errors with the URL in the message — open it out-of-band, then retry mcp_call.
Source code in src/clawd_code_sdk/models/control.py
SDKControlMcpClearAuthRequest
¶
Bases: _ControlBase
Clears authentication for an MCP server.
Source code in src/clawd_code_sdk/models/control.py
SDKControlMcpMessageRequest
¶
Bases: _ControlBase
SDK control MCP message request.
Source code in src/clawd_code_sdk/models/control.py
SDKControlMcpOAuthCallbackUrlRequest
¶
Bases: _ControlBase
Provides an OAuth redirect callback URL to complete an MCP server OAuth flow.
Sent by the SDK to the CLI with the full redirect URL (containing the authorization code) after the user completes browser-based OAuth.
Source code in src/clawd_code_sdk/models/control.py
SDKControlMcpReadResourceRequest
¶
Bases: _ControlBase
Reads a resource from a connected MCP server.
Source code in src/clawd_code_sdk/models/control.py
SDKControlMcpReadResourceResponse
¶
SDKControlMcpReconnectRequest
¶
Bases: _ControlBase
Reconnects a disconnected or failed MCP server.
Source code in src/clawd_code_sdk/models/control.py
SDKControlMcpSetServersRequest
¶
Bases: _ControlBase
Replaces the set of dynamically managed MCP servers.
Source code in src/clawd_code_sdk/models/control.py
SDKControlMcpStatusRequest
¶
Bases: _ControlBase
Requests the current status of all MCP server connections.
Source code in src/clawd_code_sdk/models/control.py
SDKControlMcpToggleRequest
¶
Bases: _ControlBase
Enables or disables an MCP server.
Source code in src/clawd_code_sdk/models/control.py
SDKControlPermissionRequest
¶
Bases: _ControlBase
SDK control permission request.
Source code in src/clawd_code_sdk/models/control.py
classifier_approvable
class-attribute
instance-attribute
¶
Set when a safetyCheck is present anywhere in the decision reason (including nested inside subcommandResults for compound bash). false = at least one safety check requires manual approval (e.g. Windows path bypass, dangerous rm); true = all safety checks MAY be classifier-approved (e.g. sensitive-file paths). Absent when no safetyCheck is involved.
decision_reason_type
class-attribute
instance-attribute
¶
Structured discriminator for why auto-mode escalated.
Lets SDK hosts make policy (e.g. auto-deny safetyCheck) without parsing decision_reason text. For compound bash commands this is "subcommandResults" even when a safetyCheck is nested inside — check classifier_approvable for that case.
SDKControlReadFileRequest
¶
Bases: _ControlBase
Read a file from the session filesystem for the remote sidebar viewer.
Path is resolved against cwd and gated by the same read-permission rules as the Read tool.
Source code in src/clawd_code_sdk/models/control.py
SDKControlReadFileResponse
¶
Bases: _ControlBase
File contents for the remote sidebar viewer.
Source code in src/clawd_code_sdk/models/control.py
lossy
class-attribute
instance-attribute
¶
True when non-UTF-8 bytes were replaced while decoding.
SDKControlRegisterRepoRootRequest
¶
Bases: _ControlBase
Registers an additional repository root (like /add-dir).
Source code in src/clawd_code_sdk/models/control.py
SDKControlReloadOutputStylesRequest
¶
SDKControlReloadOutputStylesResponse
¶
SDKControlReloadPluginsRequest
¶
Bases: _ControlBase
Reloads plugins from disk and returns the refreshed session components.
Source code in src/clawd_code_sdk/models/control.py
add_plugins
class-attribute
instance-attribute
¶
add_plugins: list[SdkPluginConfig] | None = None
Additional plugins to load as part of the reload.
hold_on_cache_impact
class-attribute
instance-attribute
¶
Don't apply the reload if it would change the tool list the prompt cache depends on.
SDKControlReloadPluginsResponse
¶
Bases: ClaudeCodeBaseModel
Refreshed commands, agents, plugins, and MCP server status after reload.
Source code in src/clawd_code_sdk/models/control.py
commands
instance-attribute
¶
commands: list[ClaudeCodeCommandInfo]
List of available slash commands.
held
class-attribute
instance-attribute
¶
True when the reload was held back because of cache impact.
SDKControlReloadSkillsRequest
¶
SDKControlReloadSkillsResponse
¶
SDKControlRemoteControlRequest
¶
Bases: _ControlBase
Toggles the remote control REPL bridge for external session access.
When enabled, starts a bridge that allows remote clients to send prompts,
permission responses, interrupts, and model changes into the session.
The response includes session_url, connect_url, and
environment_id when enabling.
Source code in src/clawd_code_sdk/models/control.py
SDKControlRenameSessionRequest
¶
Bases: _ControlBase
Sets the user-facing title for the current session.
Source code in src/clawd_code_sdk/models/control.py
SDKControlRequest
¶
SDKControlRequestUserDialogRequest
¶
Bases: _ControlBase
Requests the SDK consumer to render a tool-driven blocking dialog + return user choice.
Source code in src/clawd_code_sdk/models/control.py
SDKControlResponse
¶
SDKControlRewindFilesRequest
¶
Bases: _ControlBase
SDK control rewind files request.
Source code in src/clawd_code_sdk/models/control.py
SDKControlSeedReadStateRequest
¶
Bases: _ControlBase
Seeds the readFileState cache with a path+mtime entry.
Use when a prior Read was removed from context (e.g. by snip) so Edit validation would fail despite the client having observed the Read.
Source code in src/clawd_code_sdk/models/control.py
SDKControlSetColorRequest
¶
Bases: _ControlBase
Sets the session accent color. Accepts an agent color name or "default" to reset.
Source code in src/clawd_code_sdk/models/control.py
SDKControlSetHasSubscribersRequest
¶
Bases: _ControlBase
Tells the CLI whether anyone is watching the session output.
Source code in src/clawd_code_sdk/models/control.py
SDKControlSetMaxThinkingTokensRequest
¶
Bases: _ControlBase
Sets the maximum number of thinking tokens for extended thinking.
Source code in src/clawd_code_sdk/models/control.py
SDKControlSetModelRequest
¶
Bases: _ControlBase
Sets the model to use for subsequent conversation turns.
Source code in src/clawd_code_sdk/models/control.py
SDKControlSetPermissionModeRequest
¶
Bases: _ControlBase
SDK control set permission mode request.
Source code in src/clawd_code_sdk/models/control.py
SDKControlSetPermissionModeResponse
¶
Bases: BaseModel
Response to a set_permission_mode request.
Source code in src/clawd_code_sdk/models/control.py
mode
class-attribute
instance-attribute
¶
The permission mode now in effect, which can differ from the one asked for.
SDKControlSetProactiveRequest
¶
SDKControlSideQuestionRequest
¶
Bases: _ControlBase
Sends a side question to the model using the current conversation context.
This allows the SDK consumer to ask the model a question without adding it to the main conversation history. The CLI executes the question against the current context and returns the model's response.
Source code in src/clawd_code_sdk/models/control.py
SDKControlStopTaskRequest
¶
SDKControlUpdateSettingsRequest
¶
Bases: _ControlBase
Writes settings to the local or user settings file.
Source code in src/clawd_code_sdk/models/control.py
SDKHookCallbackRequest
¶
Bases: _ControlBase
SDK hook callback request.
Source code in src/clawd_code_sdk/models/control.py
SdkMcpServerManifest
¶
Bases: TypedDict
An in-process MCP server's handshake output, verbatim (sdkMcpServerManifests).
Source code in src/clawd_code_sdk/models/control.py
SettingsSource
¶
Bases: BaseModel
A single settings source with its raw settings.
Source code in src/clawd_code_sdk/models/control.py
SideQuestionResponse
¶
Bases: ClaudeCodeBaseModel
Response from a side question.
Source code in src/clawd_code_sdk/models/control.py
response
class-attribute
instance-attribute
¶
The model's answer, or None if no context was available.