Skip to content

ResumeSession

Base classes

Name Children Inherits
BaseSessionConfig
clawd_code_sdk.models.options
Common fields for all session configurations.

⋔ Inheritance diagram

graph TD
  548178696["options.ResumeSession"]
  2922679169["options.BaseSessionConfig"]
  2751680898["builtins.object"]
  2922679169 --> 548178696
  2751680898 --> 2922679169

🛈 DocStrings

Bases: BaseSessionConfig

Resume an existing session by ID.

Source code in src/clawd_code_sdk/models/options.py
@dataclass(kw_only=True)
class ResumeSession(BaseSessionConfig):
    """Resume an existing session by ID."""

    mode: Literal["resume"] = "resume"
    session_id: str
    """The session ID to resume."""
    fork: bool = False
    """If True, fork to a new session ID instead of continuing in-place."""
    at_message: str | None = None
    """Resume from a specific message UUID within the session."""
    drops_turn: str | None = None
    """Guard for truncating resume (``--resume-drops-turn``).

    Declares the user message UUID of the turn that ``at_message`` is expected to
    drop. The CLI refuses the resume if the truncation would discard anything else.
    Only meaningful together with ``at_message``.
    """

at_message class-attribute instance-attribute

at_message: str | None = None

Resume from a specific message UUID within the session.

drops_turn class-attribute instance-attribute

drops_turn: str | None = None

Guard for truncating resume (--resume-drops-turn).

Declares the user message UUID of the turn that at_message is expected to drop. The CLI refuses the resume if the truncation would discard anything else. Only meaningful together with at_message.

fork class-attribute instance-attribute

fork: bool = False

If True, fork to a new session ID instead of continuing in-place.

session_id instance-attribute

session_id: str

The session ID to resume.

:fa-brands-github: Show source on GitHub