Skip to content

FromPR

Base classes

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

⋔ Inheritance diagram

graph TD
  3236800485["options.FromPR"]
  2922679169["options.BaseSessionConfig"]
  2751680898["builtins.object"]
  2922679169 --> 3236800485
  2751680898 --> 2922679169

🛈 DocStrings

Bases: BaseSessionConfig

Resume sessions linked to a specific GitHub PR.

Accepts a PR number or URL. Sessions are automatically linked when created via gh pr create.

Source code in src/clawd_code_sdk/models/options.py
@dataclass(kw_only=True)
class FromPR(BaseSessionConfig):
    """Resume sessions linked to a specific GitHub PR.

    Accepts a PR number or URL. Sessions are automatically linked
    when created via ``gh pr create``.
    """

    mode: Literal["from_pr"] = "from_pr"
    pr: int | str
    """PR number or URL."""
    fork: bool = False
    """If True, fork to a new session ID instead of continuing in-place."""

fork class-attribute instance-attribute

fork: bool = False

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

pr instance-attribute

pr: int | str

PR number or URL.

:fa-brands-github: Show source on GitHub