Skip to content

ForkSessionRequest

Base classes

Name Children Inherits
AnnotatedObject
aclientp.schema.v2.base
A v2 object with the ``_meta`` extension point.

⋔ Inheritance diagram

graph TD
  95970868003200["sessions.ForkSessionRequest"]
  95970868359040["base.AnnotatedObject"]
  95970855946400["base.Schema"]
  95970851503232["main.BaseModel"]
  125067848591872["builtins.object"]
  95970868359040 --> 95970868003200
  95970855946400 --> 95970868359040
  95970851503232 --> 95970855946400
  125067848591872 --> 95970851503232

🛈 DocStrings

Bases: AnnotatedObject

UNSTABLE: Request parameters for forking an existing session.

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

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

    cursor_id: CursorId | MISSING | None = MISSING
    """The session cursor to fork at. The new session's history is the source session's history
    before the cursor."""

    cwd: AbsolutePath
    """The working directory for this session. Must be an absolute path."""

    additional_directories: Sequence[AbsolutePath] | MISSING = MISSING
    """Additional workspace roots to activate for this session. Each path must be absolute."""

    mcp_servers: Sequence[McpServer] | MISSING = MISSING
    """List of MCP servers to connect to for this session."""

    system_prompt: SystemPrompt | MISSING | None = MISSING
    """System-level instructions for the forked session."""

    config_options: Sequence[InitialSessionConfigOption] | MISSING = MISSING
    """Initial values for the forked session's config options."""

additional_directories class-attribute instance-attribute

additional_directories: Sequence[AbsolutePath] | MISSING = MISSING

Additional workspace roots to activate for this session. Each path must be absolute.

config_options class-attribute instance-attribute

config_options: Sequence[InitialSessionConfigOption] | MISSING = MISSING

Initial values for the forked session's config options.

cursor_id class-attribute instance-attribute

cursor_id: CursorId | MISSING | None = MISSING

The session cursor to fork at. The new session's history is the source session's history before the cursor.

cwd instance-attribute

The working directory for this session. Must be an absolute path.

mcp_servers class-attribute instance-attribute

mcp_servers: Sequence[McpServer] | MISSING = MISSING

List of MCP servers to connect to for this session.

session_id instance-attribute

session_id: SessionId

The ID of the session to fork.

system_prompt class-attribute instance-attribute

system_prompt: SystemPrompt | MISSING | None = MISSING

System-level instructions for the forked session.

:fa-brands-github: Show source on GitHub