Agent Client Protocol - v0.2.0-alpha.8
    Preparing search index...

    Interface SessionNotification

    Notification containing a session update from the agent.

    Used to stream real-time progress and results during prompt processing.

    See protocol docs: Agent Reports Output

    interface SessionNotification {
        sessionId: string;
        update:
            | { content: ContentBlock; sessionUpdate: "user_message_chunk" }
            | { content: ContentBlock; sessionUpdate: "agent_message_chunk" }
            | { content: ContentBlock; sessionUpdate: "agent_thought_chunk" }
            | {
                content?: ToolCallContent[];
                kind?:
                    | "read"
                    | "edit"
                    | "delete"
                    | "move"
                    | "search"
                    | "execute"
                    | "think"
                    | "fetch"
                    | "switch_mode"
                    | "other";
                locations?: ToolCallLocation[];
                rawInput?: { [k: string]: unknown };
                rawOutput?: { [k: string]: unknown };
                sessionUpdate: "tool_call";
                status?: "pending" | "in_progress" | "completed" | "failed";
                title: string;
                toolCallId: string;
            }
            | {
                content?: null
                | ToolCallContent[];
                kind?: null | ToolKind;
                locations?: null | ToolCallLocation[];
                rawInput?: { [k: string]: unknown };
                rawOutput?: { [k: string]: unknown };
                sessionUpdate: "tool_call_update";
                status?: null | ToolCallStatus;
                title?: null | string;
                toolCallId: string;
            }
            | { entries: PlanEntry[]; sessionUpdate: "plan" }
            | {
                availableCommands: AvailableCommand[];
                sessionUpdate: "available_commands_update";
            }
            | { currentModeId: string; sessionUpdate: "current_mode_update" };
    }
    Index

    Properties

    Properties

    sessionId: string

    The ID of the session this update pertains to.

    update:
        | { content: ContentBlock; sessionUpdate: "user_message_chunk" }
        | { content: ContentBlock; sessionUpdate: "agent_message_chunk" }
        | { content: ContentBlock; sessionUpdate: "agent_thought_chunk" }
        | {
            content?: ToolCallContent[];
            kind?:
                | "read"
                | "edit"
                | "delete"
                | "move"
                | "search"
                | "execute"
                | "think"
                | "fetch"
                | "switch_mode"
                | "other";
            locations?: ToolCallLocation[];
            rawInput?: { [k: string]: unknown };
            rawOutput?: { [k: string]: unknown };
            sessionUpdate: "tool_call";
            status?: "pending" | "in_progress" | "completed" | "failed";
            title: string;
            toolCallId: string;
        }
        | {
            content?: null
            | ToolCallContent[];
            kind?: null | ToolKind;
            locations?: null | ToolCallLocation[];
            rawInput?: { [k: string]: unknown };
            rawOutput?: { [k: string]: unknown };
            sessionUpdate: "tool_call_update";
            status?: null | ToolCallStatus;
            title?: null | string;
            toolCallId: string;
        }
        | { entries: PlanEntry[]; sessionUpdate: "plan" }
        | {
            availableCommands: AvailableCommand[];
            sessionUpdate: "available_commands_update";
        }
        | { currentModeId: string; sessionUpdate: "current_mode_update" }

    The actual update content.

    Type Declaration

    • { content: ContentBlock; sessionUpdate: "user_message_chunk" }
    • { content: ContentBlock; sessionUpdate: "agent_message_chunk" }
    • { content: ContentBlock; sessionUpdate: "agent_thought_chunk" }
    • {
          content?: ToolCallContent[];
          kind?:
              | "read"
              | "edit"
              | "delete"
              | "move"
              | "search"
              | "execute"
              | "think"
              | "fetch"
              | "switch_mode"
              | "other";
          locations?: ToolCallLocation[];
          rawInput?: { [k: string]: unknown };
          rawOutput?: { [k: string]: unknown };
          sessionUpdate: "tool_call";
          status?: "pending" | "in_progress" | "completed" | "failed";
          title: string;
          toolCallId: string;
      }
      • Optionalcontent?: ToolCallContent[]

        Content produced by the tool call.

      • Optionalkind?:
            | "read"
            | "edit"
            | "delete"
            | "move"
            | "search"
            | "execute"
            | "think"
            | "fetch"
            | "switch_mode"
            | "other"

        The category of tool being invoked. Helps clients choose appropriate icons and UI treatment.

      • Optionallocations?: ToolCallLocation[]

        File locations affected by this tool call. Enables "follow-along" features in clients.

      • OptionalrawInput?: { [k: string]: unknown }

        Raw input parameters sent to the tool.

      • OptionalrawOutput?: { [k: string]: unknown }

        Raw output returned by the tool.

      • sessionUpdate: "tool_call"
      • Optionalstatus?: "pending" | "in_progress" | "completed" | "failed"

        Current execution status of the tool call.

      • title: string

        Human-readable title describing what the tool is doing.

      • toolCallId: string

        Unique identifier for this tool call within the session.

    • {
          content?: null | ToolCallContent[];
          kind?: null | ToolKind;
          locations?: null | ToolCallLocation[];
          rawInput?: { [k: string]: unknown };
          rawOutput?: { [k: string]: unknown };
          sessionUpdate: "tool_call_update";
          status?: null | ToolCallStatus;
          title?: null | string;
          toolCallId: string;
      }
      • Optionalcontent?: null | ToolCallContent[]

        Replace the content collection.

      • Optionalkind?: null | ToolKind

        Update the tool kind.

      • Optionallocations?: null | ToolCallLocation[]

        Replace the locations collection.

      • OptionalrawInput?: { [k: string]: unknown }

        Update the raw input.

      • OptionalrawOutput?: { [k: string]: unknown }

        Update the raw output.

      • sessionUpdate: "tool_call_update"
      • Optionalstatus?: null | ToolCallStatus

        Update the execution status.

      • Optionaltitle?: null | string

        Update the human-readable title.

      • toolCallId: string

        The ID of the tool call being updated.

    • { entries: PlanEntry[]; sessionUpdate: "plan" }
      • entries: PlanEntry[]

        The list of tasks to be accomplished.

        When updating a plan, the agent must send a complete list of all entries with their current status. The client replaces the entire plan with each update.

      • sessionUpdate: "plan"
    • {
          availableCommands: AvailableCommand[];
          sessionUpdate: "available_commands_update";
      }
    • { currentModeId: string; sessionUpdate: "current_mode_update" }