ACP v2 (Preview) TypeScript SDK — EXPERIMENTAL - v2.12.1
    Preparing search index...

    Type Alias ResumeSessionRequestExperimental

    Request parameters for resuming an existing session.

    Resumes an existing session and optionally replays retained conversation history according to replayFrom.

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

    The ID of the session to resume.

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

    Clients MUST send the session's working directory. Agents MAY reject a different directory with -32602, and MAY normalize paths when comparing.

    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 resumed session. It MAY differ from any previously used or reported list as long as the request cwd matches the session's cwd.

    mcpServers?: McpServer[]

    List of MCP servers to connect to for this session.

    The complete set of Client-provided servers. Omitted and [] mean none. Agents SHOULD NOT restore servers from earlier requests.

    replayFrom?: ReplayFrom | null

    Inclusive cursor describing where conversation replay begins.

    Optional. Omitted and null are equivalent, and the Agent MUST NOT replay previous conversation history. Replay cursors are inclusive: replay includes the position identified by the cursor. Supplying { "type": "start" } means the Agent MUST replay all retained conversation history before responding.

    Agents MUST reject unsupported cursor types or malformed cursor values with -32602 (Invalid params), rather than substituting another cursor or resuming without replay.

    systemPrompt?: SystemPrompt | null

    System-level instructions for the resumed session.

    Optional. Omitted and null are equivalent. The Agent MAY then keep a system prompt it stored with the 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 when the session was created.

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

    The _meta property is reserved by ACP to allow Clients and Agents to attach additional metadata to their interactions. Omitted and null are equivalent and mean no metadata. Implementations MUST NOT assign meaning to keys they do not recognize.

    See protocol docs: Extensibility