Skip to content

feat(slack): Reply in the thread when an autofix run runs out of Seer credits - #129975

Open
alexsohn1126 wants to merge 7 commits into
alexsohn/cw-2325-autofix-out-of-credits-notificationfrom
alexsohn/cw-2325-slack-out-of-credits-replies
Open

alexsohn1126 wants to merge 7 commits into
alexsohn/cw-2325-autofix-out-of-credits-notificationfrom
alexsohn/cw-2325-slack-out-of-credits-replies

Conversation

@alexsohn1126

@alexsohn1126 alexsohn1126 commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

In Autofix from Slack, Autofix gives a button to a user to continue the Autofix run to the next stage.

This PR will add a billing check to those buttons, and reply with a message (as defined in #130500) to configure autoreload.

This works for every step of Autofix.

An example of this is when a user is trying to start the "draft a PR" step after code changes, but it cannot due to lack of Seer credits:

image

Works for other steps of Autofix as well, this is for the initial step (the RCA step):

image

Part of CW-2325

@linear-code

linear-code Bot commented Nov 4, 2026

Copy link
Copy Markdown

CW-2325

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Nov 4, 2026
@alexsohn1126
alexsohn1126 force-pushed the alexsohn/cw-2325-slack-out-of-credits-replies branch from 9e883a3 to b6b03b8 Compare November 5, 2026 21:01
@alexsohn1126
alexsohn1126 removed this pull request from stack #130118 November 5, 2026 21:01
@alexsohn1126
alexsohn1126 changed the base branch from master to alexsohn/cw-2329-slack-gate-autofix-buttons-on-seer-credits November 5, 2026 21:01
@alexsohn1126 alexsohn1126 changed the title feat(slack): Reply with a credits link when Seer runs out of credits feat(slack): Tell Slack threads when Seer runs out of credits Nov 5, 2026
@alexsohn1126
alexsohn1126 removed this pull request from stack #130129 November 5, 2026 21:08
@alexsohn1126
alexsohn1126 force-pushed the alexsohn/cw-2325-slack-out-of-credits-replies branch from b6b03b8 to 8df47e0 Compare November 5, 2026 21:17
@alexsohn1126
alexsohn1126 force-pushed the alexsohn/cw-2325-slack-out-of-credits-replies branch from 8df47e0 to 3920a4b Compare November 5, 2026 21:50
@alexsohn1126
alexsohn1126 removed this pull request from stack #130131 November 6, 2026 22:28
@alexsohn1126
alexsohn1126 removed this pull request from stack #130325 November 7, 2026 03:50
@alexsohn1126
alexsohn1126 force-pushed the alexsohn/cw-2325-slack-out-of-credits-replies branch from 3920a4b to 893492f Compare November 7, 2026 03:50
@alexsohn1126
alexsohn1126 changed the base branch from alexsohn/cw-2329-slack-gate-autofix-buttons-on-seer-credits to alexsohn/cw-2342-slack-check-seer-credits-before-running-an-agent-chat November 7, 2026 03:51
@alexsohn1126
alexsohn1126 removed this pull request from stack #130353 November 9, 2026 15:27
@alexsohn1126
alexsohn1126 force-pushed the alexsohn/cw-2325-slack-out-of-credits-replies branch from 893492f to d1a3df9 Compare November 9, 2026 15:27
@alexsohn1126 alexsohn1126 changed the title feat(slack): Tell Slack threads when Seer runs out of credits feat(slack): Reply in the thread when an autofix run runs out of Seer credits Nov 9, 2026
@alexsohn1126
alexsohn1126 force-pushed the alexsohn/cw-2325-slack-out-of-credits-replies branch from d1a3df9 to 95b1244 Compare November 9, 2026 15:54
@alexsohn1126
alexsohn1126 force-pushed the alexsohn/cw-2325-slack-out-of-credits-replies branch 2 times, most recently from ffb6bbd to cad4295 Compare November 9, 2026 20:23
@alexsohn1126
alexsohn1126 removed this pull request from stack #130441 November 9, 2026 20:24
@alexsohn1126
alexsohn1126 changed the base branch from alexsohn/cw-2342-slack-check-seer-credits-before-running-an-agent-chat to alexsohn/cw-2325-autofix-out-of-credits-notification November 9, 2026 20:24
@alexsohn1126
alexsohn1126 force-pushed the alexsohn/cw-2325-slack-out-of-credits-replies branch 6 times, most recently from 0afd96f to 72aebbf Compare November 10, 2026 21:04
@alexsohn1126

Copy link
Copy Markdown
Member Author

bugbot review

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 72aebbf. Configure here.

@alexsohn1126
alexsohn1126 force-pushed the alexsohn/cw-2325-slack-out-of-credits-replies branch 2 times, most recently from 20e4898 to d55fd4c Compare November 12, 2026 15:26
@alexsohn1126
alexsohn1126 marked this pull request as ready for review November 12, 2026 15:29
@alexsohn1126
alexsohn1126 requested a review from a team as a code owner November 12, 2026 15:29
@alexsohn1126
alexsohn1126 force-pushed the alexsohn/cw-2325-slack-out-of-credits-replies branch from d55fd4c to d40e087 Compare November 12, 2026 17:59
alexsohn1126 and others added 6 commits November 12, 2026 16:34
… credits

Slack posts the autofix out-of-credits notification to every thread
watching a run that fails for lack of credits, and the completion hook
reports runs whose PRs all failed for credits as out_of_credits.

SeerAutofixOperator.can_trigger_next_step decides whether the step after
an autofix update can run, so the update hides the next-step button when
the org can't run it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Slack autofix update no longer hides the next-step button when the
org has no Seer credits for that step, so drop can_trigger_next_step,
the stopping point to Seer operation mapping, and the stopping_point
argument on can_trigger_autofix. A step that can't run fails in Seer and
the thread gets the out-of-credits reply.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The out-of-credits notification now has a copy per reader. The thread
reply doesn't know who is reading, so it uses the member copy.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@alexsohn1126
alexsohn1126 force-pushed the alexsohn/cw-2325-slack-out-of-credits-replies branch from d40e087 to fa95b98 Compare November 12, 2026 21:45
…e run

Store the Slack user who started the run in the Autofix cache payload. When
the run fails for credits, look up whether that user can manage billing and
pick the copy and button for them. Runs nobody started by hand keep the
member copy.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants