Repository navigation
Conversation
Runs and PR creates that stopped because the org ran out of Seer credits looked like generic errors and offered a retry that fails the same way. Autofix now reads failure_reason=out_of_credits and pr_creation_error_code=out_of_credits and shows the out-of-credits CTA instead. The drawer cards and the chat autofix card keep what the step wrote before it stopped, including a partial diff, and drop their re-run and Try again buttons. The PR card and chat card stop offering a PR retry, and the inbox disables it with an explanation. The PR failure toast and tooltips use out-of-credits copy, and the chat swaps Seer's plain-text error block for the CTA. Fixes CW-2328 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Steps and PRs that stopped because the org ran out of Seer credits no longer render the out-of-credits CTA. The credit gates own it on each surface: the alert at the top of the Autofix tab and drawer, the alert above the chat composer and the muted alert in the issue sidebar. A stopped step or failed PR now shows one muted (drawer) or danger (chat card) line saying why it stopped, and the chat transcript swaps Seer's error block for that line. Their retries stay on screen and follow useSeerCreditCheck for the operation they would spend: disabled with an out-of-credits tooltip while the org can't afford it, enabled again once it can. That covers Re-run, Add context & retry and the card header's Re-run step in the drawer, Retry PR in the drawer and inbox, and Try again and Draft a pull request in the chat card. Refs CW-2328 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both cards gained an out-of-credits state with no story. Each story file shows the card stopped for credits with Re-run disabled, the same run after a top-up, and a run that stopped before Seer wrote anything. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Credit checks also need token-billed-seer-enabled as of #129545, so the tests, stories and SeerCreditCheckStub that turn on seer-credit-checks turn it on too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The backend's SeerOperation calls the PR step autofix_open_pr and rejects autofix_create_pr, so the PR retry gates always failed open. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The autofix embed rendered a stopped step's text with ArtifactPartialDetails, whose SeerMarkdown imports the embeds, so knip --cycles failed. The embed now renders that text with its own markdown, like the rest of its steps. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#129565 landed `AUTOFIX_CREDIT_OPERATIONS` and `useAutofixCreditCheck`, which map each autofix action to the operation the credit check prices. The retries here kept their own copy of that map. `useOutOfCreditsRetry` now takes the autofix action and checks it through `useAutofixCreditCheck`, so both gates read one map. The retry also waits on `hasCheckedSinceMount` instead of `isPending`, as the #129565 gates do. A cached answer from an earlier mount no longer enables a retry before this mount's recheck answers. SeerExplorerContent reuses `isRunOutOfCredits`, which #130463 added, for the transcript's out-of-credits line. The chat window story for a run that stopped for credits now shows the composer's out-of-credits alert, which that recheck brings up. The chat window stories answered the credit usage meter's wallet request with an empty list when they had no wallet fixture, so the meter crashed and took every story in the file with it. Those requests now fail, as they do for an org without token-billed Seer, and a story without a wallet is viewed by a member without billing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When the organization has run out of Seer credits, the Autofix endpoint refuses a step or PR with a 402 and `code: seer_out_of_credits`. `startStep` and `createPR` treated that like any other failure. They toasted the backend's detail, and a refused kickoff with no run yet painted a failed run that said "This one is on us". Both now recheck every Seer credit check, so the credit gates bring up the out-of-credits CTA and disable their buttons, and toast out-of-credits copy for the step, or for the repo's PR. A refused kickoff no longer paints a failed run, since the start card offers the CTA instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A single run that ran out of Seer credits showed "Seer failed ... This one is on us" with a Re-run that ignored the credit check. Single-run sections never carried the run's `failure_reason`, so nothing could tell a credit stop from any other failure. - The section a single run stopped in now carries `failure_reason`, as multi-step sections already do, so the cards, sidebar previews and feedback list show the out-of-credits status. - The root cause and code changes cards retry a single run that stopped for credits with a new single run, held on the `autofix_root_cause` credit check that starting one costs. Before, the root cause card called the step reset that single runs reject. - A single run's PR update that stopped gets no retry on the card, since single runs take PR feedback in the chat. Nothing is checked for it. - The drawer shows the autofix-continue alert for a single run that stopped for credits, since its Re-run is the next billable action. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Contributor
decision-model-lintervoice
decision-model-linter: 217 calls on 40 files, 579,977 input tokens, $0.024, model typesafe/jev-1.13-20260917 |
Contributor
📊 Type Coverage Diff
🔍 3 new type safety issues introducedNon-null assertions (
Type assertions (
| This is informational only and does not block the PR. |
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.
Why?
A single Autofix run that runs out of Seer credits ends with
failure_reason: out_of_credits, but the drawer didn't recognize it. Depending on where the run stopped, a card said "Seer failed … This one is on us" or "Seer proposed a fix but couldn't apply it automatically" next to Seer's raw error message. Its retry ignored the credit check, and the drawer showed no out-of-credits CTA. #129566 handles this for multi-step runs; this does the same for single runs.Stacked on #129566, so until that merges this diff includes it. Only the last commit is new.
How?
The section a single run stopped in now carries the run's
failure_reason, so the cards, sidebar previews and feedback list show the out-of-credits status from #129566. A single run is retried by starting a new one, so the cards' Re-run starts a new single run and waits on theautofix_root_causecredit check. The drawer's autofix-continue alert covers that retry too.Decisions
autofix-continuecopy, since the run stopped part way, though its retry starts a new run.The screenshots come from the
SeerDrawerContentstories, viewed by a billing member. The before shot is the same story with #129566's cards.🤖 Generated with Claude Code