Skip to content

ForkSessionRequest

Base classes

Name Children Inherits
SessionSetupRequest
aclientp.schema.client_requests
Fields shared by the session lifecycle requests (new, load, resume, fork).

⋔ Inheritance diagram

graph TD
  95970860235520["client_requests.ForkSessionRequest"]
  95970860257072["client_requests.SessionSetupRequest"]
  95970858197488["base.Request"]
  95970862258240["base.AnnotatedObject"]
  95970862254416["base.Schema"]
  95970851503232["main.BaseModel"]
  125067848591872["builtins.object"]
  95970860257072 --> 95970860235520
  95970858197488 --> 95970860257072
  95970862258240 --> 95970858197488
  95970862254416 --> 95970862258240
  95970851503232 --> 95970862254416
  125067848591872 --> 95970851503232

🛈 DocStrings

Bases: SessionSetupRequest

UNSTABLE: Request parameters for forking an existing session.

Creates a new, active session based on the context of an existing one.

Only available if the Agent supports the session.fork capability.

Source code in src/aclientp/schema/client_requests.py
class ForkSessionRequest(SessionSetupRequest):
    """**UNSTABLE**: Request parameters for forking an existing session.

    Creates a new, active session based on the context of an existing one.

    Only available if the Agent supports the `session.fork` capability.
    """

    session_id: str
    """The ID of the session to fork."""

    cursor_id: str | None = None
    """**UNSTABLE**: Fork at this session cursor instead of the end of the session.

    The new session's history is the source history before the cursor. Only IDs of
    cursors announced on the source session that currently advertise
    ``capabilities.fork`` are valid; Agents reject others with ``-32602``.
    """

cursor_id class-attribute instance-attribute

cursor_id: str | None = None

UNSTABLE: Fork at this session cursor instead of the end of the session.

The new session's history is the source history before the cursor. Only IDs of cursors announced on the source session that currently advertise capabilities.fork are valid; Agents reject others with -32602.

session_id instance-attribute

session_id: str

The ID of the session to fork.

:fa-brands-github: Show source on GitHub