Skip to content

Filesystem

Base classes

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

⋔ Inheritance diagram

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

🛈 DocStrings

Bases: ClaudeCodeBaseModel

Filesystem access control for sandboxed commands. See https://code.claude.com/docs/en/sandboxing#filesystem-isolation.

Source code in src/clawd_code_sdk/models/settings.py
class Filesystem(ClaudeCodeBaseModel):
    """Filesystem access control for sandboxed commands. See https://code.claude.com/docs/en/sandboxing#filesystem-isolation."""

    model_config = ConfigDict(
        extra="forbid",
    )
    allow_write: list[AllowWriteItem] | None = Field(None, alias="allowWrite")
    """
    Paths where subprocesses are allowed to write. Supports prefixes: // (absolute), ~/ (home directory), / (relative to settings file), ./ or no prefix (relative path). See https://code.claude.com/docs/en/sandboxing#granting-subprocess-write-access-to-specific-paths
    """
    deny_write: list[DenyWriteItem] | None = Field(None, alias="denyWrite")
    """
    Paths where subprocesses are explicitly denied write access. Takes precedence over allowWrite. See https://code.claude.com/docs/en/sandboxing#filesystem-isolation
    """
    deny_read: list[DenyReadItem] | None = Field(None, alias="denyRead")
    """
    Paths where subprocesses are explicitly denied read access. See https://code.claude.com/docs/en/sandboxing#filesystem-isolation
    """
    allow_read: list[AllowReadItem] | None = Field(None, alias="allowRead")
    """
    Paths to re-allow reading within denyRead regions. Takes precedence over denyRead for matching paths. See https://code.claude.com/docs/en/sandboxing#granting-subprocess-write-access-to-specific-paths
    """
    allow_managed_read_paths_only: bool | None = Field(None, alias="allowManagedReadPathsOnly")
    """
    (Managed settings only) When true, only allowRead paths from managed settings are used; user, project, and local allowRead entries are ignored. denyRead still merges from all sources. See https://code.claude.com/docs/en/sandboxing#filesystem-isolation
    """
    disabled: bool | None = False
    """
    Skip filesystem isolation while keeping network isolation: sandboxed commands get unrestricted read and write access to the host filesystem, and network egress stays confined to network.allowedDomains. Only honored from user, managed, or CLI --settings settings (default: false). Requires Claude Code v2.1.216 or later. See https://code.claude.com/docs/en/sandboxing#disable-filesystem-isolation
    """

allow_managed_read_paths_only class-attribute instance-attribute

allow_managed_read_paths_only: bool | None = Field(None, alias='allowManagedReadPathsOnly')

(Managed settings only) When true, only allowRead paths from managed settings are used; user, project, and local allowRead entries are ignored. denyRead still merges from all sources. See https://code.claude.com/docs/en/sandboxing#filesystem-isolation

allow_read class-attribute instance-attribute

allow_read: list[AllowReadItem] | None = Field(None, alias='allowRead')

Paths to re-allow reading within denyRead regions. Takes precedence over denyRead for matching paths. See https://code.claude.com/docs/en/sandboxing#granting-subprocess-write-access-to-specific-paths

allow_write class-attribute instance-attribute

allow_write: list[AllowWriteItem] | None = Field(None, alias='allowWrite')

Paths where subprocesses are allowed to write. Supports prefixes: // (absolute), ~/ (home directory), / (relative to settings file), ./ or no prefix (relative path). See https://code.claude.com/docs/en/sandboxing#granting-subprocess-write-access-to-specific-paths

deny_read class-attribute instance-attribute

deny_read: list[DenyReadItem] | None = Field(None, alias='denyRead')

Paths where subprocesses are explicitly denied read access. See https://code.claude.com/docs/en/sandboxing#filesystem-isolation

deny_write class-attribute instance-attribute

deny_write: list[DenyWriteItem] | None = Field(None, alias='denyWrite')

Paths where subprocesses are explicitly denied write access. Takes precedence over allowWrite. See https://code.claude.com/docs/en/sandboxing#filesystem-isolation

disabled class-attribute instance-attribute

disabled: bool | None = False

Skip filesystem isolation while keeping network isolation: sandboxed commands get unrestricted read and write access to the host filesystem, and network egress stays confined to network.allowedDomains. Only honored from user, managed, or CLI --settings settings (default: false). Requires Claude Code v2.1.216 or later. See https://code.claude.com/docs/en/sandboxing#disable-filesystem-isolation

:fa-brands-github: Show source on GitHub