Skip to content

Deduplicate covered child completions and explicit/automatic result delivery #3050

Open
0 of 1 issue completed

Description

@iamhenry

Consolidated completion-delivery scope

This is the parent tracker for preventing redundant completion prompts while preserving legitimate independent work. It covers parent/aggregate results already accounting for children and explicit-tell plus automatic-completion duplication. #1666 retains the director-specific implementation and evidence.

  • Give completion deliveries authoritative child request/turn identity, event identity, and aggregate/parent coverage, or suppress covered deliveries at the shared dispatch boundary.
  • Coalesce director-bound completion forwards by lane/event identity #1666 — Coalesce the explicit-tell and automatic-forward paths for the same director-bound lane/event; preserve dedupe across retry/restart and expose the delivery provenance.
  • Keep director-only filtering of progress/acknowledgement messages scoped to that workflow. Ordinary parents and legitimate later completions from the same child must continue to work.
  • Verify aggregate coverage, explicit-plus-automatic duplicates, concurrent/retried delivery, and independent subsequent child work. Rendered text and timing heuristics are insufficient identity.
  • Expose the resulting delivery/provenance contract through the SDK and CLI with documented semantics.

The general aggregate-result report and #1666's director case remain distinct acceptance scenarios; neither child-thread identity alone nor an earlier reply proves that a later completion is redundant.

  • No way to suppress the child-completed system message on a parent thread #3723 — Support a documented opt-out from automatic child-completion forwarding for plugin-managed reporting, at child or parent scope; keep ordinary parent notifications enabled by default. This is an additional acceptance scenario, not satisfied by aggregate deduplication alone.
  • Preserve the plugin-managed report path, including its sanitization/fencing, suppression and unread behavior; automatic forwarding must not bypass an opted-out route. Verify that opted-out reports produce no extra parent turn while ordinary later child completions still arrive.
  • Preserve No way to suppress the child-completed system message on a parent thread #3723's evidence of approximately 4,048-character excerpts cut mid-word without a marker; explicitly decide and document truncation behavior rather than treating the excerpt as a complete report.

Problem

When a parent already has a combined result, BB still sends each child's "this child finished" event to the provider as a new prompt. The provider then answers again for work that was already covered.

This is a host contract issue. Any provider that treats each inbound turn as a new user message will duplicate replies. Maintainers do not need a plugin repo to judge it.

Current state

Child-finished events arrive as ordinary new turns. Documented turn metadata does not tell a provider:

  • that the turn is a child-completion notice, not a new user request
  • which child request or turn it belongs to
  • which parent or aggregate turn already represents that child

Heuristics are not safe. Matching on rendered text, child thread id, or timing would also drop legitimate independent child completions and later valid turns from the same child.

Ideal state

Pick one:

  1. Suppress at the source. Do not dispatch child-completion events that are already represented by a parent/aggregate result.
  2. Publish provenance. Each such event includes authoritative structured fields: constituent child request/turn ids, the aggregate they belong to, and the expected parent turn that already covers them.

Until one of those exists, providers cannot drop the extras without also dropping real work.


Child thread that return responses back to the main thread end up sending duplicated message. Not ideal (recap table shown multiple times)

Image

AGENT GENERATED

Sub-issues

Sub-issues

0 of 1 Issues completed
Loading 1 sub-issues

Activity

  1. added theissue type on Sep 4, 2026
  2. added
    threads
    providers
    confirmed-repro
    on Sep 4, 2026
  3. bb-slop-cop commented on Sep 4, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    Classification: Type Bug · Priority Medium · Effort High · Labels providers, threads, confirmed-repro.

    Report: https://get-bb.github.io/reports/issues/3050.html

    Verdict: REPRODUCED · Root-cause confidence: high.

    Root cause: BB stores child-outcome taxonomy on the server event, but the strict provider-bound turn.submit contract omits that taxonomy and any aggregate linkage, so the daemon submits an ordinary new turn.

    Reproduction label: confirmed-repro.

    No pull request was opened: a safe fix requires a product/architecture choice and a public host-protocol or persisted-provenance change, which fails the simple-fix rule.

  4. changed the title [-]Child-completion events still reach the provider after a parent result already covers that work[/-] [+]Deduplicate covered child completions and explicit/automatic result delivery[/+] on Sep 9, 2026
  5. SawyerHood commented on Sep 15, 2026

    @SawyerHood
    Collaborator

    Consolidating #3723 here at the maintainer's request. Its plugin-managed reporting case overlaps this tracker's explicit-report plus automatic-completion duplication; its additional requirements are now included in the checklist above.

    New evidence from BB 0.43.0: the reporter observed 44 automatic child-completed events, with 37 representing wanted ordinary child notifications. Nesting plugin workers under their orchestrator generated both the plugin-routed report and an automatic excerpt. The automatic path bypassed the plugin's sanitization/fencing and disposition-based suppression. Excerpts were reported around 4,048 characters with unmarked mid-word truncation. These observations are reporter evidence, not a newly reproduced exploit.

    A per-child or per-parent opt-out is proposed, not a committed API design. Preserve normal parent delivery by default and legitimate subsequent child work. Dropping the plugin's own report is not an acceptable substitute for the requested routing guarantees.

    Related #3621 remains separate: it concerns host-attested plugin sender identity, not completion suppression. Closing #3723 consolidates tracking; it does not mean this behavior is fixed.

    AGENT GENERATED

  6. amrtawfik160 commented on Oct 9, 2026

    @amrtawfik160

    Adding measurements from a plugin-managed supervisor (Firstmate on bb 0.45.0), in case they help prioritise this.

    One supervisor thread, Oct 8, 12:00–22:08 UTC:

    • 126 supervisor turns in total.
    • 32 of them were started only by a child-completed notice whose result began with WAITING: (for example WAITING: CI still running on PR #2181). The plugin already tracks that child's state through its own channel, so these turns had nothing to act on.
    • The supervisor's context was about 340,000 tokens, so each of those turns re-read that much to answer "no change".

    A plugin cannot hold, batch or drop this notice today. bb thread spawn and bb thread update offer --parent-thread and --lifecycle-owner-thread, but no option for the notification.

    Any one of these would remove the cost for us:

    1. A per-child or per-parent option to turn off completed notices, keeping failed and interrupted ones.
    2. A plugin hook that runs before delivery and can hold or drop the notice.
    3. Batching: deliver child-completed notices to a parent at most once per N minutes, combined into one message.
  7. amrtawfik160 commented on Oct 10, 2026

    @amrtawfik160

    One more measured case for this issue (bb 0.45.0): duplicate "completed" notices caused by compaction.

    When a parent (or a plugin on its behalf) compacts an idle child thread, BB announces the end of that compaction turn to the parent as another child-completed notice with the same result text as the child's last real turn. On 9 Oct this produced 13 exact duplicate notices out of 275 for one supervisor (same child, same text, 42 to 209 seconds apart; initiator=system). Each duplicate started a supervisor turn.

    A compaction turn carries no new result, so it should not be announced to the parent.

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-reproprovidersthreads

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions