Skip to content

A rate-limited workflow call reports only 'Workflow worker failed' — the 429 is hidden in a child thread #1914

Description

@MGrin

A workflow call that dies on a provider 429 surfaces to every observer as the string Workflow worker failed, with no rate-limit detail anywhere in bb workflows status or bb workflows history. The real cause is present — but only inside the call's hidden child thread, which those two commands do not expose.

Measured

bb 0.39.0, macOS. Run wfr_e17de78c-4084-40bc-b9ea-07b0ca8b20d3 (a scheduled workflow, phase Collect):

bb workflows status <run>   ->  status failed, error "Workflow worker failed", calls 1/1 failed
bb workflows history <run>  ->  same string, no provider detail

The failing call was callIndex 0, dead 3.5s in. Its child thread thr_3pm5bt4jh8 holds what actually happened:

provider/rateLimits/updated   five_hour status "blocked", reachedReason "five_hour",
                              overageStatus "rejected" / org_level_disabled
provider/error                "You've hit your session limit - resets 2:40pm"
                              errorInfo { category: rate-limit, providerCode: rate_limit_event,
                                          httpStatusCode: 429 }

Not a one-off: run wfr_e86c4356 failed 13 of 29 calls with the identical opaque string and the identical 429 underneath.

Why it matters more than a cosmetic message

Workflow worker failed is indistinguishable from a bb-side crash, so the reasonable first move is to go looking for a bug in the workflow script. On this machine that cost a full investigation of a 3,000-line workflow before the child thread was read — the script was never implicated.

It also collapses two failures with opposite responses:

surfaced string actual cause correct response
Workflow worker failed provider 429 wait for the window, or switch account
fetch failed bb server stall investigate bb / the machine

A rate limit is not a defect and needs no code change; a stall is and does. Told apart only by opening a hidden child thread, they get treated the same.

Suggested fix

Propagate the child thread's provider/error — at minimum category, providerCode and httpStatusCode — into the call's own error, so bb workflows status and history can say "rate limited (429), resets HH:MM" instead of a generic worker failure. The information already exists and is already stored; it simply does not reach the surface anyone reads.

Filed from a machine that runs four scheduled bb workflows; happy to supply the full run records.

Activity

  1. added theissue type on Aug 19, 2026
  2. added
    workflows
    plugins
    cli
    on Aug 19, 2026
  3. SawyerHood commented on Aug 19, 2026

    @SawyerHood
    Collaborator

    Reproduction & root-cause report: https://get-bb.github.io/reports/issues/1914.html

    • Verdict: REPRODUCED · root-cause confidence: high
    • Root cause (short): Server builds the plugin thread.failed payload's error from system/error rows only (apps/server/src/services/threads/thread-data.ts getLastThreadErrorMessage → db getLatestThreadSystemErrorEventRow); provider-originated failures (Claude 429) are persisted as provider/error + turn/completed failed with no system/error, so plugins get error:null and the workflows plugin falls back to "Workflow worker failed" (also killing its rate-limit retry classifier and giving automations "Turn failed").
    • Proposed fix: Fix at the server boundary: add a db query returning the latest failure row across system/error AND provider/error (scoped to events since the last root turn/started to avoid stale willRetry errors), make getLastThreadErrorMessage format provider/error as detail ?? message (category, HTTP nnn, providerCode), and optionally add a structured experimental_ errorInfo/resetsAt field to the thread.failed payload (update backend-contract doc + docs/api_to_audit.md; no HOST_DAEMON_PROTOCOL_VERSION bump needed). Then have the workflows plugin use the category to skip the 1s/4s retries for blocked sub…
    • Caveats: Worktree HEAD was 0f6759a (base d81fee6 + 2 unrelated commits Read the thread TOC breakpoint off the ResizeObserver entry #1912/fix(tasks): support ultra reasoning in presets #1923); neither touches the affected paths. Live 429 was produced with a fake Anthropic endpoint (ANTHROPIC_BASE_URL) rather than a genuinely exhausted account, but it yields the identical claude-code rate_limit_event/provider/error/turn-completed-failed event sequence as the issue's thread. The reporter's second run (13/29 fai…

    The report has copy-paste repro steps, screenshots where the bug is visual, code permalinks at the base commit, and repro artifacts. It was independently re-run by a second agent (see its Verification section).

    AGENT GENERATED: by Claude Opus 5

  4. added
    confirmed-repro
    on Aug 19, 2026
  5. esteban-dozsa commented on Oct 20, 2026

    @esteban-dozsa

    Additional reproduction on bb 0.46.1: this also affects failures from a third-party ACP provider, without any HTTP 429.

    Environment

    • bb 0.46.1, desktop installation; macOS 15.8.1.
    • Abacus plugin using @get-bb/plugin-sdk 0.6.49 and its experimental_acpProviderBridge.
    • Tested on 2026-10-20 through the real bb UI and saved feature workflow. The provider CLI was a deterministic fake, so no Abacus service/network failure was required. I have not retested current bb main or a newer release.

    Reproduction setup

    1. Run a workflow worker through the SDK's ACP bridge, using a fake CLI that either emits an explicit error result or opens a tool and then stops emitting output.
    2. Have the adapter answer the worker's ACP session/prompt with JSON-RPC error -32000, preserving the original diagnostic. In the watchdog case, mark the unfinished tool failed too.
    3. Catch the workflow's agent() rejection and compare the recorded call error with the worker's thread events.

    Observed

    Both cases fail the worker correctly, but the recorded workflow call error and the rejected agent() message are only Workflow worker failed.

    For the explicit-error case, the child thread contains:

    provider/error:
      message: "Provider error"
      detail: "The Abacus CLI reported an error: stopped responding (probe is_error, coder attempt 1)"
    turn/completed:
      status: "failed"
    

    For the watchdog case, it contains:

    item/completed (fileChange): status "failed"
    provider/error:
      message: "Provider error"
      detail: "The Abacus CLI stopped responding: no output for 10 minutes. This is usually a dropped connection to Abacus."
    turn/completed:
      status: "failed"
    

    The probe shortened the watchdog; the actual wait was about 80 seconds. The hard-coded "10 minutes" wording is a separate issue in our probe adapter, not a measured bb timeout.

    Local evidence identifiers:

    • Explicit error: run wfr_0a740039-f643-4495-b2eb-b1de7cca9766, worker thr_5ydjwmf7um.
    • Watchdog: run wfr_464009b3-e1c0-4399-8ed7-5b8001ef9df1, worker thr_rdd3saqr6y.

    Each failed worker had repairAttempts: 0 and providerRetryAttempts: 0. The feature workflow returned its own agent-failed result. Its outer run status was succeeded because the script caught the rejection and returned that result; that is separate from the lost failure message.

    Expected and source inspection

    The call error and agent() rejection should retain the current failure's provider/error.detail (falling back to its message), so the workflow can distinguish a watchdog stop from other worker failures.

    Inspection of the installed 0.46.1 bundle corroborates the root cause already reported here and addressed by closed, unmerged #2079: getLastThreadErrorMessage queries only system/error, and the workflows plugin substitutes Workflow worker failed when thread.failed.error is null.

    One additional path worth covering when this is fixed: workflow startup reconciliation explicitly fails an already-errored worker with Workflow worker failed before attachment completed. That path may still lose the cause even after the normal thread.failed payload is fixed. I observed this fallback in the code; I have not independently reproduced that race.

    Useful regression coverage: both normal failure delivery and failure before attachment; selecting diagnostics from the current failed turn rather than an older turn; preserving interrupted cancellation; and keeping these watchdog failures at zero corrective/provider retries.

    AGENT GENERATED: by Codex

  6. gaodes commented on Nov 24, 2026

    @gaodes

    Still present on bb 0.50.1 (Linux, workflows 0.1.0), with the Pi provider. The empty thread.failed error has a second effect beyond the message: it disables the workflow's own transient retry.

    Run wfr_fae3d930-…: 5 concurrent agent() calls on pi / zai/glm-5.3-flash. 3 calls failed in 30–100 s with error: "Workflow worker failed" and providerRetryAttempts: 0.

    Worker thread events (bb thread log <id> --json):

    provider/error  detail "429: {\"code\":\"1302\",\"message\":\"Rate limit reached for requests\"}"
                    errorInfo { category: "rate-limit", providerCode: null, httpStatusCode: 429 }, willRetry: true   (x3)
    provider/error  same, no willRetry
    turn/completed  status "failed"
    

    Why no retry happens

    1. provider-retry declines: bb provider-retry explain shows decision: { kind: "decline", reason: "no-rate-limit-state" }, availability: not-routed. A Pi 429 with no reset time gets no retry.
    2. Workflows waits for that decision, gets "re-run", then runs its transient check in runAgentCall: if (delay === undefined || !isTransient(err)) throw err. err comes from thread.failed's error, which is empty, so the plugin uses the literal "Workflow worker failed". isTransient matches status codes and text such as "rate limit" or "429", so it never matches, and the documented "retries transient provider failures twice with bounded backoff" never runs for a worker turn failure.

    Suggested fixes

    • Fill thread.failed.error from the turn's last provider/error (the root cause in the report above). That alone lets the existing classifier retry it.
    • Or let workflows classify from the last provider/error.errorInfo (category: "rate-limit", httpStatusCode: 429) when the event has no error.
    • Optionally, provider-retry could retry a structured rate-limit 429 without reset state with a short backoff, as it does for overloads.

    Our workaround: limit to 2 concurrent workers per provider, and lengthen Pi's agent retry (retry.maxRetries: 5, retry.baseDelayMs: 5000) so a per-minute 429 clears inside Pi.

  7. added a commit that references this issue on Nov 25, 2026
    fb045a0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    cliconfirmed-repropluginsworkflows

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions