Skip to main content

agent_session_stopped event

A user clicked the stop button on an agent session

Facts

Required Scopes
Compatible APIs

Usage info

Slack sends the agent_session_stopped event when a user clicks the native stop button shown while an agent session is in the processing status. All apps that manage agent sessions must handle this event; supporting stop is not opt-in.

When you receive this event, your app should:

  1. Stop any in-progress work for the given channel and thread.
  2. Clean up resources and confirm to the user that work has stopped.
  3. Transition the session away from processing using either agents.sessions.setStatus or chat.stopStream.

The session status does not update automatically when the user clicks stop. Your app is responsible for transitioning the status.

{
"channel": "C0123ABC456",
"event_ts": "1783536983.783769",
"team_id": "T0123ABC456",
"thread_ts": "1782234671.392669",
"message_ts": "1782234987.693923",
"type": "agent_session_stopped",
"user": "U123ABC456"
}

See Stopping a session for the full flow.