Skip to content

feat(seer-billing): Skip credit checks on runs agentic triage starts - #130552

Open
srest2021 wants to merge 6 commits into
srest2021/CW-3061-autofix-out-of-creditsfrom
srest2021/CW-3061-agentic-triage-feature
Open

srest2021 wants to merge 6 commits into
srest2021/CW-3061-autofix-out-of-creditsfrom
srest2021/CW-3061-agentic-triage-feature

Conversation

@srest2021

@srest2021 srest2021 commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

Depends on #130284.

Agentic triage isn't billed yet, so nothing on a run it starts should be blocked for credits.

  • Agentic triage starts Autofix runs with SeerFeature.AGENTIC_TRIAGE, stored on the run. The API can't set it.
  • Credit checks skip runs with that feature: every step, the PR push, PR feedback from the UI, and single-run replies, whether a person or the pipeline triggers them. Every other run is checked as before.
  • Post-process automation skips token-billed orgs, since agentic triage handles their automations.

Note that Seer still tags these runs' LLM calls as autofix. Tagging them agentic_triage is a Seer follow-up to make sure we're not billing for them anyway.

Refs CW-3061

Agentic triage isn't billed yet. It now starts Autofix runs with SeerFeature.AGENTIC_TRIAGE, stored on the run, and credit checks skip runs with that feature: every step, the PR push, and single-run replies. Post-process automation skips token-billed orgs, since agentic triage handles their automations.

Refs CW-3061
@linear-code

linear-code Bot commented Nov 10, 2026

Copy link
Copy Markdown

CW-3061

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Nov 10, 2026
Dispatch reads it from the run mirror it already loads, and the PR push joins the mirror into its existing run query, so neither makes an extra query.

Refs CW-3061
Checking existing_run_id directly lets mypy narrow it, and is_new_run can't drift from the lookup.

Refs CW-3061
…-credits' into srest2021/CW-3061-agentic-triage-feature
…ge runs

Feedback typed in the UI is credit-checked before it's queued. The run's feature is only read when the check refuses, so most requests make no extra query.

Refs CW-3061
@srest2021
srest2021 marked this pull request as ready for review November 10, 2026 00:54
@srest2021
srest2021 requested review from a team as code owners November 10, 2026 00:54
@srest2021
srest2021 changed the base branch from srest2021/CW-3061-autofix-gating to srest2021/CW-3061-autofix-out-of-credits November 10, 2026 00:54

@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.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit d15d1c0. Configure here.

if is_seer_seat_based_tier_enabled(group.organization):
if is_seer_seat_based_tier_enabled(group.organization) or features.has(
"organizations:token-billed-seer-enabled", group.organization
):

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.

Token-billed orgs lose Autofix automation

High Severity

Token-billed orgs now skip post-process Autofix, but agentic triage still only enrolls seat-based or free-cohort orgs (seer.night_shift.enable_for_legacy_orgs defaults to false). Paying token-billed orgs can be left with an issue summary and no automated Autofix.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit d15d1c0. Configure here.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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.

1 participant