Skip to content

AutoMode

Base classes

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

⋔ Inheritance diagram

graph TD
  227376267["settings.AutoMode"]
  2604142835["base.ClaudeCodeBaseModel"]
  3879467795["main.BaseModel"]
  2751680898["builtins.object"]
  2604142835 --> 227376267
  3879467795 --> 2604142835
  2751680898 --> 3879467795

🛈 DocStrings

Bases: ClaudeCodeBaseModel

Customization for the auto mode classifier prompt. Typically configured in managed settings to tune the allow/deny rules used when permissions.defaultMode is "auto". By default, allow, soft_deny, and environment REPLACE the corresponding built-in classifier section entirely. Include the literal string "$defaults" as an array entry (added in v2.1.118) to splice the built-in defaults in at that position alongside your custom rules. See https://code.claude.com/docs/en/permissions.

Source code in src/clawd_code_sdk/models/settings.py
class AutoMode(ClaudeCodeBaseModel):
    """Customization for the auto mode classifier prompt. Typically configured in managed settings to tune the allow/deny rules used when permissions.defaultMode is "auto". By default, allow, soft_deny, and environment REPLACE the corresponding built-in classifier section entirely. Include the literal string "$defaults" as an array entry (added in v2.1.118) to splice the built-in defaults in at that position alongside your custom rules. See https://code.claude.com/docs/en/permissions."""

    model_config = ConfigDict(
        extra="forbid",
    )
    allow: list[str] | None = None
    """
    Rules for the auto mode classifier allow section. Replaces the built-in allow rules entirely unless the literal string "$defaults" is included as an entry, which splices the built-in defaults in at that position.
    """
    soft_deny: list[str] | None = None
    """
    Rules for the auto mode classifier soft-deny section. Replaces the built-in soft-deny rules entirely unless the literal string "$defaults" is included as an entry, which splices the built-in defaults in at that position.
    """
    environment: list[str] | None = None
    """
    Entries for the auto mode classifier environment section. Replaces the built-in environment context entirely unless the literal string "$defaults" is included as an entry, which splices the built-in defaults in at that position.
    """
    hard_deny: list[str] | None = None
    """
    Rules for the auto mode classifier hard-deny section. Hard-deny rules block unconditionally regardless of user intent. Replaces the built-in hard-deny rules entirely unless the literal string "$defaults" is included as an entry, which splices the built-in defaults in at that position. See https://code.claude.com/docs/en/permissions
    """
    classify_all_shell: bool | None = Field(False, alias="classifyAllShell")
    """
    UNDOCUMENTED. Route all Bash/PowerShell commands through the auto mode classifier instead of only arbitrary-code-execution patterns (added in v2.1.193).
    """

allow class-attribute instance-attribute

allow: list[str] | None = None

Rules for the auto mode classifier allow section. Replaces the built-in allow rules entirely unless the literal string "$defaults" is included as an entry, which splices the built-in defaults in at that position.

classify_all_shell class-attribute instance-attribute

classify_all_shell: bool | None = Field(False, alias='classifyAllShell')

UNDOCUMENTED. Route all Bash/PowerShell commands through the auto mode classifier instead of only arbitrary-code-execution patterns (added in v2.1.193).

environment class-attribute instance-attribute

environment: list[str] | None = None

Entries for the auto mode classifier environment section. Replaces the built-in environment context entirely unless the literal string "$defaults" is included as an entry, which splices the built-in defaults in at that position.

hard_deny class-attribute instance-attribute

hard_deny: list[str] | None = None

Rules for the auto mode classifier hard-deny section. Hard-deny rules block unconditionally regardless of user intent. Replaces the built-in hard-deny rules entirely unless the literal string "$defaults" is included as an entry, which splices the built-in defaults in at that position. See https://code.claude.com/docs/en/permissions

soft_deny class-attribute instance-attribute

soft_deny: list[str] | None = None

Rules for the auto mode classifier soft-deny section. Replaces the built-in soft-deny rules entirely unless the literal string "$defaults" is included as an entry, which splices the built-in defaults in at that position.

:fa-brands-github: Show source on GitHub