Repository navigation
Description
What we observed
On 2026-08-21 a first-party-style plugin (accounts, a path: plugin) threw on every invocation of one handler for 55.4 hours. Throughout that window:
bb plugin listreported the plugin asrunning- its per-plugin counter read
handlers: 0 errors - the plugin's own log carried 196 throws, all
bb.sdk.threads.rateLimitRecovery is not a function, first2026-08-19T05:37Z, last2026-08-21T13:02:21Z
So the one number a person would check to answer "is this plugin healthy" read healthy for the entire outage. Nobody noticed until someone read the log file directly.
For contrast, the counter is not always zero — we saw handlers: 24 errors on a different plugin the same day, so the mechanism works for whatever it does count.
What we think the mechanism is — stated as inference, not as a claim about your code
We have not read bb's handler dispatch. From the outside, the observation is consistent with the counter incrementing only on exceptions that escape the handler, while an exception caught inside the handler never reaches it. We could be wrong about the internals; the observation above is what we measured.
This looks adjacent to #2128 (routing uncaught service exceptions to the supervisor) but not the same case — that one is about exceptions escaping to the process, this one is about exceptions that never escape at all.
Why it matters
handlers: N errors is the natural health signal — it is in bb plugin list, it needs no log access, and it is what an operator or an automated check reaches for first. A signal that reads 0 during a total functional outage is worse than no signal, because a check built on it passes and reports healthy.
What would help
Counting handler-caught exceptions as well — or exposing them as a separate figure, if conflating them would be wrong for other consumers — would have surfaced this on the first throw rather than after 55 hours, with no log parsing and no time window.
What we did locally, and its limits
We shipped a log-reading backstop that greps plugin logs for JavaScript TypeError/ReferenceError shapes. Measured 196/196 precision over 27,161 log lines, but it structurally cannot catch three cases:
- a handler throwing a plain domain
Error("sync failed: …")— textually indistinguishable from ~2,000 legitimate timeout/stall lines in the same corpus - a handler that fails silently, logging nothing
- a broken plugin nothing exercises, so it never reaches the throw
All three would be covered by the counter. Happy to provide the log corpus or test against a patch if that is useful.
Version
bb 0.39.0, macOS 26 (Darwin 25.5.0).
Activity
SawyerHood commentedon Aug 24, 2026
---Auto-Generated---
Reproduction & root-cause report: https://get-bb.github.io/reports/issues/2286.html
service ${name} crashed: ${message}) mirroring invokeWrapped; clear the detail after a healthy stretch. In plugin-api.ts emitLog, count level === "error" calls (either into errorCount or a new additive handlerStats.loggedErrorCount in packages/server-contract) and set statusDetail to the latest message. Change apps/cli/src/commands/plugin.ts printPlugin to print the handlers lin…The report is self-contained: copy-paste repro steps with the test or script inline, expected vs actual output, screenshots where the bug is visual, and code permalinks at the base commit. It was independently re-executed by a second agent (see its Verification section).
Count plugin service crashes in the plugin's error total and status