Skip to content

provider-retry: one pending retry per thread, not per failed request #6826

Closed

Description

@einarhorn

When a Claude/Codex thread hits a subscription limit, every later message to that thread (tells, user messages) starts a new turn, fails, and gets its own retry row: retryFailedTurn dedupes only on retryOfTurnRequestId. After the reset, the rows drain one by one as separate turns. On 11-02 a single lead got 28 "Please continue." retries in 14 minutes, and another got 18 (12 separate turns). A 25-thread fleet had 72 pending rows for one outage.

Suggested behaviour:

  1. In retryFailedTurn (or the builtin plugin), when the thread already has an unclaimed retry row, don't add a second "Please continue." row. If the new failed turn's input was never accepted, append its input to the existing row as an input group instead of creating a row.
  2. Optionally, while a thread has a pending rate-limit retry with a future sendAt for the same route, queue new messages behind it as visible rows instead of starting a turn that is sure to fail, unless the route reports ready (for example an account pool switch).
  3. bb provider-retry status should show the count per thread.

Expected effect: one recovery turn per thread per outage, with every message kept.

Activity

  1. added theissue type on Nov 2, 2026
  2. added
    providers
    threads
    provider-retry
    confirmed-repro
    on Nov 2, 2026
  3. bb-slop-cop commented on Nov 2, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    • Classification: Bug · Priority: Medium · Effort: Medium. Added providers, threads, and provider-retry; no existing classifications were overwritten.
    • Report: https://get-bb.github.io/reports/issues/6826.html — REPRODUCED, high confidence; reproduction label: confirmed-repro.
    • Root cause: Retry admission deduplicates by original request ID, not by thread recovery. Three distinct failures queued three retries and drained as three turns, including repeated continuation nudges for accepted input.
    • Verification: Both acceptance cases reproduced in two clean trusted-main checkouts; all 13 existing retry tests pass. The repeatable regression patch and output are embedded in the report.
    • No PR: Lossless coalescing needs policy for differing execution settings and retry-chain ownership; a thread-only rejection risks dropping unaccepted input.
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

    confirmed-reproprovider-retryprovidersthreads

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions