Repository navigation
Conversation
A failed agent run and an automation bb paused after a failure now show the stored reason: at the end of the list row, under the detail header, and in the failed run's detail block. Runs refused for an unusable target thread name the cause (archived, deleted, no longer exists, or its status) instead of a generic list, and every automation paused on that thread gets the same reason.
Contributor
Author
|
On structured error codes: this PR keeps failure reasons as free text on purpose. The UI renders Add a stored
|
alexandre-vl
added a commit
to alexandre-vl/bb
that referenced
this pull request
Oct 23, 2026
…-environment After get-bb#6122 moved the composer into plugins/composer, the carry merged after bb/project-default-environment through three merge bases whose virtual base conflicts in plugins/automations/detail-view.tsx, so Fork Sync skipped it. Merged first, its bases are main and two commits upstream already has (get-bb#6054, get-bb#6005), and bb/project-default-environment then arrives already included.
2 tasks done
alexandre-vl
added a commit
to alexandre-vl/bb
that referenced
this pull request
Oct 30, 2026
- bb/daemon-self-update-node-npm-cli (get-bb#6083): superseded by upstream get-bb#6194. - bb/project-default-source-host (get-bb#6054) and bb/explain-failed-automations-thr_agcnkvvvke (get-bb#6005): merged upstream; each merges into main with main's own tree. - carry/automation-environment-composer: it only reconciled the composer branch with explain-failed, and the updated bb/automation-environment-composer merges without it. - carry/github-plugin-inbox: it breaks bb-plugin-github#typecheck on current main; the updated github-plugin-inbox carries the inbox itself.
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.
Human comments
What was wrong
The automations plugin already stored why a run failed (
automation_runs.error) and why an automation stopped (automations.last_error), but the app rendered neither for agent automations:RunRowshowedrun.erroronly for script runs, and onlybb automation showreadlastError. A run refused before it reached a thread, for example because its target thread had been archived, therefore showed a red ✕ and0.0swith no thread to open, while bb silently paused the automation. The stored text was also vague (Target thread … is unavailable: missing, deleted, archived, or not runnable) although the plugin had already read which one applied, and other automations on the same thread were paused withtarget thread deletedeven when it had been archived.What changed
detail-view.tsx): a failed run shows itserrorin the existing detail block for every run mode, not only scripts. Agent runs that reached a thread stay clickable; that thread is the full log.detail-view.tsx,overview-view.tsx,metadata.tsx): an automation with alastErrorshows it under the detail header and at the end of the list row's metadata. The list's red ✕ follows the same rule, so it never appears without its reason: it clears on Resume, which already clearedlastError, and hides while a run is in flight.src/run.ts,src/data.ts): a refused target thread recordsTarget thread <id> was archived,was deleted,no longer exists, oris <status>, and every automation paused on that thread gets the same message. Thethread.deletedhandler recordsTarget thread <id> was deleted. TheWHERE last_error = 'target thread deleted'marker query becameUPDATE … RETURNING.Failure Statesdetail story.How you verified
pnpm exec turbo run typecheck lint test --filter=bb-plugin-automations: 141 tests pass; lint reports 0 errors (4 pre-existingset-state-in-effectwarnings in untouched code).main's implementation (6 failed, 135 passed) and pass on this branch: archived and missing targets name their cause on the run and on both automations, the list ✕ appears only with its reason (including during a retry and after Resume), and the detail header and a failed agent run show the error.main's components (before) and this branch's (after). Dark theme and 390px also checked. Not exercised in a full dev app.Before:
mainatb143a2286· After:1a1d53ad8· Ladle stories, light theme, 2×Refs #4166: this covers its visible reason and the vague wording; recovering a target thread left in
errorstays open there.