Repository navigation
Description
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 telloutside any thread is recorded asinitiator: userwith 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
- Send a
child-completed,child-failedandchild-interruptednotice to the parent only when the turn's inputs include one the parent sent (asenderThreadIdequal 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. - Record who the human at the keyboard is. Give a CLI
bb thread tellfrom outside a thread, a plugin or an automation aninitiatorof its own (for examplescript), so a consumer can tell it from a typed message. - 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 telloutside any thread is recorded asinitiator: userwith 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 GENERATEDand links the thread or report.
Activity
bb-slop-cop commentedon Oct 15, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotApplied and verified the missing classification:
threads,cliTrusted 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.