Skip to content

ClaudeEntryBase

Sub classes

Name Children Inherits
ClaudeMessageEntryBase
clawd_code_sdk.storage.models
Base for user/assistant message entries with message payload.
ClaudeSystemEntryBase
clawd_code_sdk.storage.models
Common fields shared across all system entry subtypes.
ClaudeProgressEntry
clawd_code_sdk.storage.models
Progress entry for tracking tool execution status (older Claude Code versions).
    ClaudeAttachmentEntry
    clawd_code_sdk.storage.models
    Context attached to the conversation (hook output, file contents, reminders, ...).
      ClaudeSavedHookContextEntry
      clawd_code_sdk.storage.models
      Saved hook context entry.

        Base classes

        Name Children Inherits
        ClaudeStorageModel
        clawd_code_sdk.storage.models
        Base for transcript models: fields these models don't know are kept.

        ⋔ Inheritance diagram

        graph TD
          3306911705["models.ClaudeEntryBase"]
          746985124["models.ClaudeStorageModel"]
          2604142835["base.ClaudeCodeBaseModel"]
          3879467795["main.BaseModel"]
          2751680898["builtins.object"]
          746985124 --> 3306911705
          2604142835 --> 746985124
          3879467795 --> 2604142835
          2751680898 --> 3879467795

        🛈 DocStrings

        Bases: ClaudeStorageModel

        Base of all entries that take part in the parentUuid chain.

        User, assistant, attachment, system, progress and saved-hook-context entries all link to their predecessor through parent_uuid. The chain regularly runs through non-message entries (an assistant entry's parent is often an attachment or a system entry), so code walking the chain should index every ClaudeEntryBase by uuid, not only user and assistant entries. See :mod:clawd_code_sdk.storage.chain.

        Source code in src/clawd_code_sdk/storage/models.py
        class ClaudeEntryBase(ClaudeStorageModel):
            """Base of all entries that take part in the ``parentUuid`` chain.
        
            User, assistant, attachment, system, progress and saved-hook-context entries all link
            to their predecessor through ``parent_uuid``. The chain regularly runs through
            non-message entries (an assistant entry's parent is often an attachment or a system
            entry), so code walking the chain should index every ``ClaudeEntryBase`` by ``uuid``,
            not only user and assistant entries. See :mod:`clawd_code_sdk.storage.chain`.
            """
        
            uuid: str
            parent_uuid: str | None = None
            logical_parent_uuid: str | None = None
            """Preserves logical parent when parentUuid is nullified for session breaks."""
            session_id: str
            timestamp: str
        
            # Context
            cwd: str = ""
            git_branch: str | None = None
            version: str = ""
            entrypoint: str | None = None
            """CLAUDE_CODE_ENTRYPOINT — distinguishes cli/sdk-ts/sdk-py/etc."""
            slug: str | None = None
            """Session slug for files like plans (used for resume)."""
        
            # Metadata
            user_type: UserType = "external"
            is_sidechain: bool = False
            is_meta: bool | None = None
            agent_id: str | None = None
            team_name: str | None = None
            """Team name if this is a spawned agent session."""
            agent_name: str | None = None
            """Agent's custom name (from /rename or swarm)."""
            agent_color: str | None = None
            """Agent's color (from /rename or swarm)."""
            prompt_id: str | None = None
            """Correlates with OTel prompt.id for user prompt messages."""
            data_flow_on: bool | None = None
        

        agent_color class-attribute instance-attribute

        agent_color: str | None = None
        

        Agent's color (from /rename or swarm).

        agent_name class-attribute instance-attribute

        agent_name: str | None = None
        

        Agent's custom name (from /rename or swarm).

        entrypoint class-attribute instance-attribute

        entrypoint: str | None = None
        

        CLAUDE_CODE_ENTRYPOINT — distinguishes cli/sdk-ts/sdk-py/etc.

        logical_parent_uuid class-attribute instance-attribute

        logical_parent_uuid: str | None = None
        

        Preserves logical parent when parentUuid is nullified for session breaks.

        prompt_id class-attribute instance-attribute

        prompt_id: str | None = None
        

        Correlates with OTel prompt.id for user prompt messages.

        slug class-attribute instance-attribute

        slug: str | None = None
        

        Session slug for files like plans (used for resume).

        team_name class-attribute instance-attribute

        team_name: str | None = None
        

        Team name if this is a spawned agent session.

        :fa-brands-github: Show source on GitHub