Skip to content

A parent should only get a turn end notice for a turn it started #5560

Description

@Geczy

Summary

A parent should only get a turn end notice for a turn it started

Problem

A parent thread gets a child-completed notice every time a child's turn ends, whoever started the turn. When the user types into a child directly, the parent wakes on a turn it did not start and has no work in, and when it answers with bb thread tell <child> the child starts a second turn, which ends and wakes the parent a second time. The user was already talking to the child, so the parent's tell is noise at best and a conflicting instruction at worst.

Evidence (bb 0.46.0, one orchestrator thread with 1,779 child completion notices, 9/29 to 10/14)

From client/turn/requested and turn/completed events in bb.db, a child's turn counts as the user's when its request has source: tell, initiator: user, no senderThreadId, and a text no script sent:

  • The user typed into a child 44 times, which ended as 26 finished turns that sent the parent a notice. The parent turn that read each notice told the child in 5 (19%), and in 7 (27%) within 30 minutes. For turns the parent started it is 27 of 302 (9%) in the wake turn and 31% within 30 minutes.
  • The 26 notices cost the parent $12.34 at list price (mean $0.47 a wake), plus $1.13 for the second wakes the 5 tells caused.
  • A script that runs bb thread tell outside any thread is recorded as initiator: user with no sender, exactly like a typed message. 785 of the 829 requests first counted as typed were a PR watcher's, a stage notice's or a router's tell. No field tells them apart, so the parent and any hook have to guess from the text.

Ask

  1. Send a child-completed, child-failed and child-interrupted notice to the parent only when the turn's inputs include one the parent sent (a senderThreadId equal to the parent, or the spawn brief). A turn that only read user input needs no parent wake. Failures and interruptions should still always reach the parent.
  2. Record who the human at the keyboard is. Give a CLI bb thread tell from outside a thread, a plugin or an automation an initiator of its own (for example script), so a consumer can tell it from a typed message.
  3. Optional: a per parent setting, notices: all | own-turns, so the default stays as it is.

What we do until it ships

hooks/hub-wake.py in the staff repo blocks the completed notice of a turn only the user typed, using a UserPromptSubmit hook (probed on bb 0.46.0: the hook fires for a bb delivered notice, idle or mid turn, decision: block ends the turn with no model call and no token use, and a settings.json hook added to a running session takes effect without a restart). The text based guess for "typed" is typed_prompts.SCRIPT, which drifts whenever a script's wording changes, so ask 2 would replace it.

Versions and environment

bb 0.46.0, one orchestrator thread with 1,779 child completion notices, 9/29 to 10/14

Steps to reproduce

  • The user typed into a child 44 times, which ended as 26 finished turns that sent the parent a notice. The parent turn that read each notice told the child in 5 (19%), and in 7 (27%) within 30 minutes. For turns the parent started it is 27 of 302 (9%) in the wake turn and 31% within 30 minutes.
  • The 26 notices cost the parent $12.34 at list price (mean $0.47 a wake), plus $1.13 for the second wakes the 5 tells caused.
  • A script that runs bb thread tell outside any thread is recorded as initiator: user with no sender, exactly like a typed message. 785 of the 829 requests first counted as typed were a PR watcher's, a stage notice's or a router's tell. No field tells them apart, so the parent and any hook have to guess from the text.

Expected vs actual

1. Send a `child-completed`, `child-failed` and `child-interrupted` notice to the parent only when the turn's inputs include one the parent sent (a `senderThreadId` equal to the parent, or the spawn brief). A turn that only read user input needs no parent wake. Failures and interruptions should still always reach the parent.
2. Record who the human at the keyboard is. Give a CLI `bb thread tell` from outside a thread, a plugin or an automation an `initiator` of its own (for example `script`), so a consumer can tell it from a typed message.
3. Optional: a per parent setting, `notices: all | own-turns`, so the default stays as it is.

Evidence

No response

What you ruled out

No response

Suggested priority and effort (optional)

No response

Checks

  • I reproduced this on the latest release or on main, or I say above that I could not.
  • I searched open and closed issues for the same problem.
  • If an agent wrote this, the body ends with > AGENT GENERATED and links the thread or report.

Activity

  1. added
    threads
    cli
    on Oct 15, 2026
  2. bb-slop-cop commented on Oct 15, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    Applied and verified the missing classification:

    • Type: Feature
    • Priority: Medium — recurring orchestration noise and cost, with a reported workaround; no outage or data loss established.
    • Effort: High — selective notification policy and distinct script attribution require cross-surface provenance/schema decisions.
    • Labels: threads, cli

    Trusted main currently forwards child outcomes without turn-author filtering and explicitly defaults unattributed dispatches to user attribution. Selective delivery and a separate script identity extend that existing contract. Related: #3723 (notification opt-out), #4424 (notice attribution), #3050 (completion delivery).

    No existing classification values were replaced. No reproduction report or pull request: this is classified as a feature, so the bug-report and simple-fix stages do not apply.

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

    clithreads

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions