Skip to content

fix(events): Keep automation Watch replies in the run's thread - #2069

Merged
dcramer merged 2 commits into
mainfrom
fix/automation-watch-thread-delivery
Oct 8, 2026
Merged

dcramer merged 2 commits into
mainfrom
fix/automation-watch-thread-delivery

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

A scheduled automation run posted its report at the channel top level. A PR Watch it created then posted "getsentry/yc-scraper#5 merged." as a second top-level message instead of replying in the report's thread.

Root cause

Since #1888 and #1891, automation runs have a channel-level Location with no thread. The run's first reply is bound to the Conversation, so user replies in that thread already route back to it. Watch Turns ignored that binding and posted to the channel again on every event. Event-only Conversations had the same problem.

Fix

When a Turn's Slack Location has no thread, reply under the first Slack Message bound to the Conversation in that channel. If nothing is bound yet, the first reply still starts the thread.

Known gap

When a run's only output is a DM to its creator, Watch replies still go to the channel the automation was created in. Tracked in #2014.

via David Cramer.

--

View Junior Session [Sentry]

Automation runs post their first reply at the channel top level. Later
Watch Turns in the same Conversation read the channel-level Location and
posted new top-level Messages instead of replying in that thread.

Event Turns now thread under the first Slack Message bound to the
Conversation in its Location's channel.

Co-Authored-By: David Cramer <[email protected]>
@vercel

vercel Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
junior-docs Ready Ready Preview Oct 8, 2026 8:41pm UTC

Request Review

@github-actions

github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

7 screenshot changes — 7 changed · 0 added · 0 removed

Review screenshots in Frameshift

Automation Attention · Desktop
Automation Attention · Desktop
Changed
Conversation Event Details · Desktop
Conversation Event Details · Desktop
Changed
Conversation Event Log · Desktop
Conversation Event Log · Desktop
Changed
Conversation Fork Dialog · Desktop
Conversation Fork Dialog · Desktop
Changed
Conversation Image Draft · Desktop
Conversation Image Draft · Desktop
Changed
System Cache Missing · Desktop
System Cache Missing · Desktop
Changed
Show 1 more changed screenshot
Workspaces · Desktop
Workspaces · Desktop
Changed

@dcramer
dcramer merged commit 50787b3 into main Oct 8, 2026
41 of 42 checks passed
@dcramer
dcramer deleted the fix/automation-watch-thread-delivery branch October 8, 2026 20:44
sentry-junior Bot added a commit that referenced this pull request Oct 9, 2026
An automation run's first post at the channel top level starts its
thread, but the run kept a channel-level Location. #2069 looked the
thread up in event Turns only, so other Location readers still pointed
at the channel.

Store the thread on the Location when the post is bound, and remove the
lookup.

Co-Authored-By: David Cramer <[email protected]>
sentry-junior Bot added a commit that referenced this pull request Oct 9, 2026
An automation run's first post at the channel top level starts its
thread, but the run kept a channel-level Location. #2069 looked the
thread up in event Turns only, so other Location readers still pointed
at the channel.

Store the thread on the Location when the post is bound, and remove the
lookup.

Co-Authored-By: David Cramer <[email protected]>

This branch was successfully deployed

1 active deployment
Preview – junior-docs — c2c5a908 Deployed Oct 8, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: high PR risk score: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant