ExperimentalThe ID of the session to close.
Optional_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
Request parameters for closing an active session.
The Agent MUST cancel any ongoing work related to the session as if
session/cancelwas called, then free the resources associated with the session. Unlikesession/cancel, closing also stops the session's background work. After the close response, the Agent sends no notifications or requests for the session on that connection. It still answerssession/promptrequests that were pending.Closing a session that does not exist or is not active SHOULD succeed, and Clients SHOULD treat a
-32002response as a successful close.When closing cancels active foreground work, the Agent MUST send the final updates for that work and the idle
state_updatewithstopReason: "cancelled"before responding successfully tosession/close. Closing an idle session does not itself require another idle update.Closing also cancels pending
session/promptrequests whose messages have not been inserted, including held prompts. If closing prevents a prompt's user message from being inserted, the Agent MUST answer that request with-32800(Request cancelled). If the message has already been inserted, the Agent MUST respond successfully with itsmessageId. Prompt responses need not precede the close response.