Skip to content

ClaudeCodeServerInfo

Base classes

Name Children Inherits
ClaudeCodeBaseModel
clawd_code_sdk.models.base
Base model for all Claude Code Pydantic models.

â‹” Inheritance diagram

graph TD
  87551575["server_info.ClaudeCodeServerInfo"]
  2604142835["base.ClaudeCodeBaseModel"]
  3879467795["main.BaseModel"]
  2751680898["builtins.object"]
  2604142835 --> 87551575
  3879467795 --> 2604142835
  2751680898 --> 3879467795

🛈 DocStrings

Bases: ClaudeCodeBaseModel

Complete server initialization info from Claude Code.

This is returned by the Claude Code server during initialization and contains all available capabilities including models, commands, output styles, and account information.

Source code in src/clawd_code_sdk/models/server_info.py
class ClaudeCodeServerInfo(ClaudeCodeBaseModel):
    """Complete server initialization info from Claude Code.

    This is returned by the Claude Code server during initialization and contains
    all available capabilities including models, commands, output styles, and
    account information.
    """

    models: list[ClaudeCodeModelInfo] = Field(default_factory=list)
    """List of available AI models."""

    commands: list[ClaudeCodeCommandInfo] = Field(default_factory=list)
    """List of available slash commands."""

    output_style: str = Field(default="default")
    """Current output style setting."""

    available_output_styles: list[str] = Field(default_factory=list)
    """List of all available output styles."""

    unavailable_models: list[ClaudeCodeModelInfo] | None = None
    """Models the account can see but not select (e.g. excluded by org ZDR settings)."""

    account: ClaudeCodeAccountInfo | None = Field(default=None)
    """Account and authentication information."""

    auth_conflict: AuthConflict | None = None
    """Set when both an auth token and an API key are configured (source names only)."""

    current_model: str | None = None
    """The CLI's active model at connect time."""

    agents: list[ClaudeCodeAgentInfo] = Field(default_factory=list)
    """List of available subagents."""

    fast_mode_state: FastModeState | None = None
    """Fast mode state: off, in cooldown after rate limit, or actively enabled."""

    fast_mode_disabled_reason: FastModeDisabledReason | None = None
    """Why fast mode is unavailable, if it is."""

    claude_code_version: str | None = None
    """Version of the Claude Code process answering initialize."""

    capabilities: list[str] | None = None
    """Feature capability tags supported by the CLI (undocumented, informational)."""

    current_permission_mode: str | None = None
    """Permission mode the session is currently in (undocumented)."""

    session_state: str | None = None
    """Current session state, e.g. "idle" (undocumented)."""

    user_output_styles_dir: str | None = None
    """Directory for user-defined output styles (undocumented)."""

    feedback_mode: FeedbackMode | None = None
    """How the CLI collects feedback (undocumented)."""

    analytics_disabled: bool | None = None
    other_hook_ask_outranks_host: bool | None = None
    remote_control_available: bool | None = None
    remote_control_auto_enable: bool | None = None
    remote_control_auto_connect_default: bool | None = None
    remote_control_auto_on_by_default: bool | None = None
    ide_rc_auto_enable_gate: bool | None = None

    hooks_applied: bool | None = None
    """False when the process was already running and did not register SDK hooks."""

    hook_on_failure_supported: bool | None = None
    """Whether the CLI honors ``on_failure`` on hook matchers."""

    hooks_when_unanswered_kept: int | None = None
    """Number of registered hook matchers whose ``whenUnanswered`` the CLI kept."""

    code_running_mcp_tools_applied: dict[str, list[str]] | None = None
    """MCP tools declared via ``codeRunningMcpTools``, keyed by server name."""

    managed_settings_applied: bool | None = None
    """Whether the initialize's ``managedSettings`` match the ones stored at launch."""

    mcp_servers_applied: bool | None = None
    """Whether the initialize's ``mcpServers`` match the set read at launch."""

    host_worded_asks: bool | None = None
    """Desktop host only: PreToolUse asks are sent to the host as can_use_tool requests."""

    workspace_trust_recorded: bool | None = None
    """Outcome of the ``workspaceTrust`` attestation."""

    inbound_read_receipts: bool | None = None
    """Remote Control hosts only: client messages get processing/processed receipts."""

    permission_mode_from_default_fallback: bool | None = None
    """IDE hosts only: permission mode is auto because no settings source configured one."""

    auto_default_nudge: str | None = None
    """IDE hosts only: the defaultMode the auto-default nudge offers to replace."""

    footer_indicator: dict[str, Any] | None = None
    """The terminal's configured footer pill (undocumented structure)."""

    feedback_survey_config: dict[str, Any] | None = None
    """Present only when the host may show the feedback survey (undocumented structure)."""

    survey_followup_box: dict[str, Any] | None = None
    """Survey follow-up config for VS Code/desktop hosts (undocumented structure)."""

    claude_in_chrome_at_startup: bool | None = None
    """Whether an IDE host should connect Claude in Chrome when the session starts."""

    claude_in_chrome_prompt_disabled: bool | None = None
    """True when CLAUDE_CODE_DISABLE_CFC_PROMPT is set."""

    plugins_applied: bool | None = None
    """Whether every plugin sent via initialize is loaded."""

    sdk_mcp_manifests_parked: (
        dict[
            str,
            Literal[
                "parked",
                "already_connected",
                "protocol_version_mismatch",
                "malformed",
                "not_honoured",
            ],
        ]
        | None
    ) = None

    pid: int | None = None
    """Process id."""

account class-attribute instance-attribute

account: ClaudeCodeAccountInfo | None = Field(default=None)

Account and authentication information.

agents class-attribute instance-attribute

agents: list[ClaudeCodeAgentInfo] = Field(default_factory=list)

List of available subagents.

auth_conflict class-attribute instance-attribute

auth_conflict: AuthConflict | None = None

Set when both an auth token and an API key are configured (source names only).

auto_default_nudge class-attribute instance-attribute

auto_default_nudge: str | None = None

IDE hosts only: the defaultMode the auto-default nudge offers to replace.

available_output_styles class-attribute instance-attribute

available_output_styles: list[str] = Field(default_factory=list)

List of all available output styles.

capabilities class-attribute instance-attribute

capabilities: list[str] | None = None

Feature capability tags supported by the CLI (undocumented, informational).

claude_code_version class-attribute instance-attribute

claude_code_version: str | None = None

Version of the Claude Code process answering initialize.

claude_in_chrome_at_startup class-attribute instance-attribute

claude_in_chrome_at_startup: bool | None = None

Whether an IDE host should connect Claude in Chrome when the session starts.

claude_in_chrome_prompt_disabled class-attribute instance-attribute

claude_in_chrome_prompt_disabled: bool | None = None

True when CLAUDE_CODE_DISABLE_CFC_PROMPT is set.

code_running_mcp_tools_applied class-attribute instance-attribute

code_running_mcp_tools_applied: dict[str, list[str]] | None = None

MCP tools declared via codeRunningMcpTools, keyed by server name.

commands class-attribute instance-attribute

commands: list[ClaudeCodeCommandInfo] = Field(default_factory=list)

List of available slash commands.

current_model class-attribute instance-attribute

current_model: str | None = None

The CLI's active model at connect time.

current_permission_mode class-attribute instance-attribute

current_permission_mode: str | None = None

Permission mode the session is currently in (undocumented).

fast_mode_disabled_reason class-attribute instance-attribute

fast_mode_disabled_reason: FastModeDisabledReason | None = None

Why fast mode is unavailable, if it is.

fast_mode_state class-attribute instance-attribute

fast_mode_state: FastModeState | None = None

Fast mode state: off, in cooldown after rate limit, or actively enabled.

feedback_mode class-attribute instance-attribute

feedback_mode: FeedbackMode | None = None

How the CLI collects feedback (undocumented).

feedback_survey_config class-attribute instance-attribute

feedback_survey_config: dict[str, Any] | None = None

Present only when the host may show the feedback survey (undocumented structure).

footer_indicator class-attribute instance-attribute

footer_indicator: dict[str, Any] | None = None

The terminal's configured footer pill (undocumented structure).

hook_on_failure_supported class-attribute instance-attribute

hook_on_failure_supported: bool | None = None

Whether the CLI honors on_failure on hook matchers.

hooks_applied class-attribute instance-attribute

hooks_applied: bool | None = None

False when the process was already running and did not register SDK hooks.

hooks_when_unanswered_kept class-attribute instance-attribute

hooks_when_unanswered_kept: int | None = None

Number of registered hook matchers whose whenUnanswered the CLI kept.

host_worded_asks class-attribute instance-attribute

host_worded_asks: bool | None = None

Desktop host only: PreToolUse asks are sent to the host as can_use_tool requests.

inbound_read_receipts class-attribute instance-attribute

inbound_read_receipts: bool | None = None

Remote Control hosts only: client messages get processing/processed receipts.

managed_settings_applied class-attribute instance-attribute

managed_settings_applied: bool | None = None

Whether the initialize's managedSettings match the ones stored at launch.

mcp_servers_applied class-attribute instance-attribute

mcp_servers_applied: bool | None = None

Whether the initialize's mcpServers match the set read at launch.

models class-attribute instance-attribute

models: list[ClaudeCodeModelInfo] = Field(default_factory=list)

List of available AI models.

output_style class-attribute instance-attribute

output_style: str = Field(default='default')

Current output style setting.

permission_mode_from_default_fallback class-attribute instance-attribute

permission_mode_from_default_fallback: bool | None = None

IDE hosts only: permission mode is auto because no settings source configured one.

pid class-attribute instance-attribute

pid: int | None = None

Process id.

plugins_applied class-attribute instance-attribute

plugins_applied: bool | None = None

Whether every plugin sent via initialize is loaded.

session_state class-attribute instance-attribute

session_state: str | None = None

Current session state, e.g. "idle" (undocumented).

survey_followup_box class-attribute instance-attribute

survey_followup_box: dict[str, Any] | None = None

Survey follow-up config for VS Code/desktop hosts (undocumented structure).

unavailable_models class-attribute instance-attribute

unavailable_models: list[ClaudeCodeModelInfo] | None = None

Models the account can see but not select (e.g. excluded by org ZDR settings).

user_output_styles_dir class-attribute instance-attribute

user_output_styles_dir: str | None = None

Directory for user-defined output styles (undocumented).

workspace_trust_recorded class-attribute instance-attribute

workspace_trust_recorded: bool | None = None

Outcome of the workspaceTrust attestation.

:fa-brands-github: Show source on GitHub