Skip to content

Adding AgentSessionTitleChanged event - #267

Merged
soxtoby merged 1 commit into
soxtoby:masterfrom
we4sz:agent-session-title-changed
Nov 1, 2026
Merged

soxtoby merged 1 commit into
soxtoby:masterfrom
we4sz:agent-session-title-changed

Conversation

@we4sz

@we4sz we4sz commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

Slack sends agent_session_title_changed when a user changes the title of an agent session, and SlackNet has no model for it, so an app that subscribes to it gets the base Event with everything in ExtraProperties. I ran into it building an app on the agent session support from #262: my app subscribes to the event and reads channel, thread_ts and user through Event.ExtraProperties. A handler for the base Event receives every event, so the app also needs a small filter that picks this one out by its type name. This models the event the way AgentSessionStopped is modelled, so both go away. It is one commit.

  1. AgentSessionTitleChanged (agent_session_title_changed) with Channel, ThreadTs, User, Title (the new title) and PreviousTitle (previous_title, omitted when the session had no title before the change). The doc comments follow the reference page.

Compatibility

Additive, but like #264 it moves fields: code that reads this event's fields out of ExtraProperties on the base Event stops finding them there, and a handler for the base Event now receives an AgentSessionTitleChanged.

Testing

Three deserialization tests in the style of AgentSessionStoppedTests: the payload from the reference page, a change where the session had no title before, and an event without a thread. ./do test passes (786 tests).

Not verified: I haven't captured this event from a live workspace, so AgentSessionTitleChanged follows the reference page only. Two things on that page I left out: team_id, which its example shows inside the event while the page for agent_session_stopped says it is on the enclosing event_callback, and enterprise_id, which the page says is included for org-level installs. Both stay in ExtraProperties.

@soxtoby
soxtoby merged commit abab2ba into soxtoby:master Nov 1, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants