ACP v2 TypeScript SDK — UNSTABLE DRAFT - v2.0.0
    Preparing search index...

    Type Alias ForkSessionRequestExperimental

    UNSTABLE

    This capability is not part of the spec yet, and may be removed or changed at any point.

    Request parameters for forking an existing session.

    Creates a new session based on the context of an existing one, allowing operations like generating summaries without affecting the original session's history.

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

    type ForkSessionRequest = {
        sessionId: SessionId;
        cwd: AbsolutePath;
        additionalDirectories?: AbsolutePath[];
        mcpServers?: McpServer[];
        systemPrompt?: SystemPrompt | null;
        _meta?: { [key: string]: unknown } | null;
    }
    Index
    sessionId: SessionId

    The ID of the session to fork.

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

    additionalDirectories?: AbsolutePath[]

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

    When omitted or empty, no additional roots are activated. When non-empty, this is the complete resulting additional-root list for the forked session.

    mcpServers?: McpServer[]

    List of MCP servers to connect to for this session.

    systemPrompt?: SystemPrompt | null

    UNSTABLE

    This capability is not part of the spec yet, and may be removed or changed at any point.

    System-level instructions for the forked session.

    Optional. Omitted and null are equivalent; the Agent may then keep a system prompt it stored with the source session or use its default instructions. Clients MUST only send this when the Agent advertises session.systemPrompt, and SHOULD send the same value they used for the source session.

    _meta?: { [key: string]: unknown } | null

    The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.

    See protocol docs: Extensibility