Repository navigation
fix(automations): Tell the agent where to write the Automation creator mention - #2435
Merged
Merged
Conversation
A due reminder such as "Remind me to do healthchecks" often posts "Reminder: Do your healthchecks." without the creator mention, so Slack notifies nobody. #2052 changed the creator line in task input from a rule about what to write ("Where the instructions say "me" or "my", write this mention.") to a rule about what "me" means ("Me" and "my" mean this person: mention them in the message.). With only the meaning, the model often resolves "me" to "your" and drops the mention. The task input also reaches the model XML-escaped inside `<current-instruction>`, so the mention shows as `<@U…>`, which makes the drop more likely. The creator line now says what to write again, and it keeps the rule to not mention the creator when the instructions do not say "me" or "my". Co-Authored-By: David Cramer <david@sentry.io>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This comment has been minimized.
This comment has been minimized.
Sentry Evalsjunior-behavioral
Base commit junior-guardian
Base commit junior-integration
Base commit |
Contributor
|
4 screenshot changes — 4 changed · 0 added · 0 removed Review screenshots in Frameshift
|
Stored instructions keep the creator's own words. Each run reads the creator identity and renders its mention for the Destination, instead of using the createdBy copy or a mention saved in the instruction text. Co-Authored-By: David Cramer <david@sentry.io>
Co-Authored-By: David Cramer <david@sentry.io>
dcramer
reviewed
Oct 30, 2026
The instruction tool description said "write it to stand alone" without saying what that means. A reference such as "this channel", "here", "this thread", or "that PR" needs the request to make sense. The run does not see the request. The description now tells the agent to replace each such reference with the exact target, such as a channel mention, a link, or an ID.
The run does not see the request, so "me" means nothing in a saved instruction. Tools now save "the creator", and each run binds it to the creator identity. The creator line still treats "me", "my", and a stored creator mention as the creator, so older instructions keep working. Co-Authored-By: David Cramer <david@sentry.io>
"The creator" also matched resource creators, such as an issue creator. Use the full term in the tool description and the Created by line. Bring back the rule to write exact targets instead of references to the conversation. Reject "me" and "my" in an update by a requester who did not create the Automation, because each run reads them as the creator.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit b0eeaa6. Configure here.
Creation already ties the creator identity to the Slack actor, so the lookup could not change the mention. Keep createdBy for the Created by: line. Replace the hard "me"/"my" rejection with tool guidance and an eval for a requester who did not create the Automation. Simplify the Created by: line to one rule. Co-Authored-By: David Cramer <david@sentry.io>
The integration evals on a8eeb44 showed that "write this mention for them" lets the model drop the mention in both delivery cases. Say where to write it, as the earlier passing lines did. Say again in the tool description that each run knows the Automation creator, so the agent keeps the term instead of dropping the person.
Member
|
are the eval failures related? |
dcramer
pushed a commit
that referenced
this pull request
Oct 30, 2026
Since #2440 (`15ee5c130`), an automation run no longer writes its saved visibility to the Destination row. Only a live Slack signal does. A run into a channel with no row stores `unknown`, and readers treat it as private. In production, the Slack thread where a person created the Automation records the channel. The eval fixture inserted Automations without that thread, so their channels stayed `unknown`. The fixture reads results as `WEB_VIEWER_EMAIL`, who is not a participant. So `readConversationAccessFromSql` returned `canViewPrivateContent: false`, and the reporting API hid tool payloads for every scheduled and event automation run. Tool calls came back with no input and no output (`result null [4B]` on every tool). `finishAutomationRun` results and tool arguments were empty. This broke these cases on unrelated branches (#2435, #2442, fix/flaky-behavioral-evals, chore/remove-slash-command): - Integration: `Event automation delivery` (no-match silence ×2, blocked automation) and `Scheduled Delivery` (no message outcome) - Behavioral: `Scheduled Delivery` (post in this channel, provider that Junior does not have) and `Sentry Skill Workflows` (creator-bound scheduled Sentry work) There is no product change. Fail-closed `unknown` is intended (#2440). Automations are created from a live Slack turn in their channel, so production channels have a known visibility. ## Fix `packages/junior-evals/src/fixture/insert.ts`: `insertScheduledAutomation` and `insertEventAutomation` now store the creation thread through the Conversation store with `visibility: "public"`, as the live Slack event would. No assertions, cases, or timeouts change. ## Checks - `pnpm lint`, `pnpm typecheck`, `pnpm --filter @sentry/junior-evals test` pass. - A throwaway harness check (not committed) used the real insert functions. A dispatch-shaped write into a bare `slackChannel()` was redacted (`unknown`). Channels from either insert function were readable (`public`). - The 7 affected eval cases did not run locally: the sandbox has no `cloudflared` for eval egress. CI must confirm them. <!-- junior-request-attribution:start --> via **David Cramer**. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:agent%3A5d3914babce549420a1ad7b950c41799 --> -- [View Session](https://junior-prod.sentry.dev/conversations/agent%3A5d3914babce549420a1ad7b950c41799) [[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3A5d3914babce549420a1ad7b950c41799/?project=4510944073809921) <!-- junior-session-footer:end --> --------- Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
dcramer
approved these changes
Oct 30, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

An Automation runs later without the conversation that created it. Words such as "this channel" or "here" mean nothing then. Before this change, the tools told the agent to rewrite "me" as the creator's Slack mention in the saved instruction. Now the agent calls the creator "the Automation creator". The run-time
Created by:line says who that is and where to write the mention.Refs #2362
Run-time creator line (
chat/task-input.ts)createdBy.slackUserId. The create tools require that it is the creator identity's Slack user in the same workspace.Tool description (
chat/automations/edit-schema.ts)The shared instruction description for the scheduled and event create and update tools now says:
The full term "the Automation creator" keeps "issue creator" or "PR creator" from matching. A requester who did not create the Automation is covered by this guidance and an eval, not by a fixed keyword check.
Evals (integration)
<@U0TEST>.<@U0TEST>, without "me", "my", or "Automation creator".Live results on c570f89 (integration run 41101189024, merged with main 15ee5c1)
finishAutomationRunresult, which was null in the eval session for dispatch runs. They failed the same way on other PRs against the same main, and fix(evals): Record automation fixture channels as public #2449 fixes the fixture. These failures do not come from this PR.Not in this PR
renderCurrentInstruction(chat/current-instruction.ts) XML-escapes the task text, so the model sees<@U0TEST>. This can also make the model drop a mention. It applies to every current instruction, so it needs its own change.createdBycopy tocreatorIdentityIdis a separate hard cutover.via David Cramer.
--
View Session [Sentry]