Skip to content

feat: add agent_session_stopped and agent_session_title_changed events - #1635

Merged
zimeg merged 2 commits into
mainfrom
clack/agent-session-events
Aug 26, 2026
Merged

feat: add agent_session_stopped and agent_session_title_changed events#1635
zimeg merged 2 commits into
mainfrom
clack/agent-session-events

Conversation

@zimeg

@zimeg zimeg commented Aug 22, 2026

Copy link
Copy Markdown
Member

Adds Events API support for the two agent session events an agent app receives, mirroring the existing assistant event pattern (event model + payload wrapper + handler base class per event).

Events

  • agent_session_stopped — the user clicked the native stop button while the agent session was processing.
    • type, channel, user, thread_ts, streaming_message_ts (list), event_ts
  • agent_session_title_changed — the user renamed the session.
    • type, channel, user, team_id, thread_ts, title, previous_title, event_ts

What's included

  • Event models: AgentSessionStoppedEvent, AgentSessionTitleChangedEvent (slack-api-model)
  • Payload wrappers: AgentSessionStoppedPayload, AgentSessionTitleChangedPayload (slack-app-backend)
  • Handler base classes: AgentSessionStoppedHandler, AgentSessionTitleChangedHandler
  • Deserialization tests for both models

No central registry to edit — event routing is by reflection over the event type, so app.event(AgentSessionStoppedEvent.class, handler) self-registers (consistent with the other event types).

Notes

Category

  • slack-api-model / slack-app-backend

Requirements

Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you agree to those rules.

Adds event models, payload wrappers, and handler base classes for the
two agent session events an agent app receives, mirroring the assistant
event pattern. Payload fields captured from live events.

- agent_session_stopped: type, channel, user, thread_ts,
  streaming_message_ts (array), event_ts
- agent_session_title_changed: type, channel, user, team_id, thread_ts,
  title, previous_title, event_ts

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
@zimeg zimeg added enhancement M-T: A feature request for new functionality semver:minor labels Aug 22, 2026
@zimeg zimeg self-assigned this Aug 22, 2026
@zimeg zimeg added this to the 1.50.1 milestone Aug 22, 2026
@codecov

codecov Bot commented Aug 22, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.84%. Comparing base (1a14eb4) to head (5ea65c2).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...end/events/handler/AgentSessionStoppedHandler.java 0.00% 2 Missing ⚠️
...vents/handler/AgentSessionTitleChangedHandler.java 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1635      +/-   ##
============================================
- Coverage     72.86%   72.84%   -0.03%     
+ Complexity     4534     4533       -1     
============================================
  Files           480      482       +2     
  Lines         14418    14422       +4     
  Branches       1512     1512              
============================================
- Hits          10506    10505       -1     
- Misses         3017     3022       +5     
  Partials        895      895              
Flag Coverage Δ
jdk-14 72.84% <0.00%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@zimeg
zimeg marked this pull request as ready for review August 26, 2026 22:21
@zimeg
zimeg requested a review from a team as a code owner August 26, 2026 22:21
@zimeg

zimeg commented Aug 26, 2026

Copy link
Copy Markdown
Member Author

⚡ Will merge to match documented events!

@zimeg
zimeg merged commit ff1d546 into main Aug 26, 2026
7 checks passed
@zimeg
zimeg deleted the clack/agent-session-events branch August 26, 2026 22:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement M-T: A feature request for new functionality project:slack-api-model project:slack-api-model project:slack-app-backend semver:minor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant