Skip to content

ClaudeWorktreeStateEntry

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
  1550673618["models.ClaudeWorktreeStateEntry"]
  746985124["models.ClaudeStorageModel"]
  2604142835["base.ClaudeCodeBaseModel"]
  3879467795["main.BaseModel"]
  2751680898["builtins.object"]
  746985124 --> 1550673618
  2604142835 --> 746985124
  3879467795 --> 2604142835
  2751680898 --> 3879467795

🛈 DocStrings

Bases: ClaudeStorageModel

Records whether the session is currently inside a worktree.

Last-wins: an enter writes the session, an exit writes null. On --resume, restored only if the worktreePath still exists on disk.

Source code in src/clawd_code_sdk/storage/models.py
class ClaudeWorktreeStateEntry(ClaudeStorageModel):
    """Records whether the session is currently inside a worktree.

    Last-wins: an enter writes the session, an exit writes null.
    On --resume, restored only if the worktreePath still exists on disk.
    """

    type: Literal["worktree-state"]
    session_id: str
    worktree_session: ClaudePersistedWorktreeSession | None = None

:fa-brands-github: Show source on GitHub