Repository navigation
Report a failed run back to the Slack thread that started it - #212
Merged
Merged
Conversation
…rted it A run launched by @mentioning the bot is fire-and-forget for whoever typed the mention: they see whatever the agent chose to post back, and nothing at all when the run dies before the agent could post anything — which is exactly when the failure most needs saying out loud. Slack triggers now answer in the same thread when a run they started fails, naming the failed step and its error (or the account that ran out of credits), with a link to the run. `notify_on_failure` defaults to true and is a switch on the Slack trigger form; the MCP trigger tools take it too. The hook is on the `fail` transition rather than in WorkflowService.fail, because that is not the only way a run ends up failed — the stale-run sweeper calls `fail!` straight on the record, and a run reaped as stale is precisely the kind of failure nobody is watching for. Posting happens in a job, so a Slack outage can never turn a failed run into a failed state transition. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Signed-off-by: Artem Petrov <[email protected]>
artempartos
force-pushed
the
feat/slack-trigger-failure-notification
branch
from
September 5, 2026 22:07
8971251 to
ca6d6ef
Compare
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.
A run launched by @mentioning the bot is fire-and-forget for whoever typed the mention: they see whatever the agent chose to post back, and nothing at all when the run dies before the agent could post anything — which is exactly when the failure most needs saying out loud.
What changed
trigger_bindings.notify_on_failure, default true. A switch on the Slack trigger form; the MCP trigger tools (create_workflow_trigger/update_workflow_trigger) take it too.Where the hook lives
On the
failtransition, not inWorkflowService.fail— that is not the only way a run ends up failed. The stale-run sweeper callsfail!straight on the record, and a run reaped as stale is precisely the kind of failure nobody is watching for.The post itself runs in
Slack::NotifyRunFailureJob, so a Slack outage can never turn a failed run into a failed state transition.RunFailureNotifierreturnsfalseon every unhappy path rather than raising.Deliberately quiet
shared_context) — nobody asked for a notification on it.InternalTools::SlackPostMessage#slack_integration.Checks
docker compose exec -T web make check_all— green, includingschema_parity_test.🤖 Generated with Claude Code