Repository navigation
Description
The workflow
I run one orchestrating parent thread that spawns child threads for parallel work and reports back a summary when the batch is done. I want the parent to receive periodic progress, not a wake on every child turn, and not silence until the end.
Concretely, I want to choose a cadence per child: report every N finished turns, or report only after the child has been idle for some interval. Failures, interruptions, and blockers should still wake the parent immediately, because those need a decision.
What happens today
main at e1f27dbf30ad9456275d09ee22073766c45ee65f already filters which outcomes notify the parent. parentNotifications is auto | stuck | off, added in #5578:
apps/server/src/services/threads/thread-parent.ts
12: export function isParentNotifiableChildThread<
27: case "stuck":
So the outcome dimension is covered. What is missing is a cadence dimension. Under auto, every qualifying turn end still wakes the parent. The only dampener is a fixed 2 second coalescing window that batches children completing at nearly the same moment:
apps/server/src/services/threads/child-thread-notifications.ts
78: const CHILD_THREAD_TURN_NOTIFICATION_BATCH_DELAY_MS = 2_000;
Two seconds collapses bursts. It does nothing for a child that runs 50 turns over ten minutes.
Measured on my own database (~/.bb/bb.db, bb 0.46.1, 2026-09-23 through 2026-10-20), counting parent turns whose request carried a child system message:
systemMessageKind count
child-completed 1323
child-failed 85
child-outcome-batch 25
child-interrupted 7
child-needs-attention 2
1,323 child-completed wakes. Two parent threads account for 421 of them:
thread_id child-completed notices
thr_eqqq6bmzug 270
thr_tf8zuywpur 151
Each of those is a separate parent turn that re-reads the parent's context to answer a notice that usually needs no reply. #5560 measured the same effect on one orchestrator at 1,779 notices between 9/29 and 10/14 and put the cost at $12.34 for 26 notices, a mean of $0.47 per wake.
None of auto, stuck, or off express "report every 5th turn" or "report after 2 minutes idle." The choice is every qualifying outcome, or none of the successes.
What you would expect
A cadence control alongside the existing outcome filter, so a child can report on a schedule instead of per turn. For example:
bb thread spawn --parent-self --parent-notifications auto \
--parent-notification-cadence every-5-turnsbb thread update thr_child --parent-notification-cadence idle-2mMeaning:
every-n-turnsbatches n completed turns into one parent notice, carrying the same footer the current batch notice uses so the parent can tell it is a summary.idle-2msends one notice once the child has had no turn for the interval, so a burst of short turns produces one wake at the end.immediatestays the default and preserves today's behavior.- Failures, interruptions, and blockers (
child-failed,child-interrupted,child-needs-attention) always bypass the cadence and wake the parent at once. - A pending cadence flush is delivered when the child is archived or stopped, so a burst never ends silently.
Acceptance sketch
-
Spawn a parent and a child with
--parent-notifications auto --parent-notification-cadence every-3-turns, and drive six successful turns in the child. -
Observe exactly two
child-completedturns in the parent's log, the second one at turn 6 and both marked as batched summaries:bb thread log <parent-thread-id>
-
Repeat with
--parent-notification-cadence idle-2mand drive five turns in under a minute, then wait past two minutes. Observe one parent notice, after the idle interval, not five. -
In a run governed by
every-3-turns, make the child's second turn fail. Observechild-failedin the parent immediately, not at turn 3. -
Set
--parent-notification-cadence immediateand observe a notice on every completed turn, matching 0.46.1 behavior.
Context and alternatives
What I do today is set --parent-notifications off on chatty children and have the parent poll them with bb thread tell, which moves the token cost into the parent's own polling turns rather than removing it. #5560 describes blocking the wake with a UserPromptSubmit hook, which also pays for the wake before it is blocked.
The shapes I considered and did not pick:
- A higher coalescing window alone. A fixed window still wakes once per window per parent, and a child that runs a turn every 90 seconds with a 2 minute window still wakes every 90 seconds in the worst case.
- Percentile or token-budget thresholds. Harder to predict from the outside than a turn count or an idle interval, and the operator cannot state the intent in a flag.
- Folding cadence into the
parentNotificationsenum, for examplestuckplusbatched. It multiplies the enum and conflates two independent choices: which outcomes matter, and how often to hear about them. A separate axis keepsauto | stuck | offintact and letsstuckand a cadence compose.
Issue / reference to issue
- Let a child thread tell its parent only when it finishes, not after every turn #4487 (Let a child thread tell its parent only when it finishes, not after every turn): asks for an outcome filter,
--notify-parent <every-turn|on-finish>. PR Let child threads control which outcomes notify their parent #5578 delivered the equivalent asauto | stuck | off, so this issue does not repeat it. It asks for the scheduling axis that enum does not have. - PR Let child threads control which outcomes notify their parent #5578 (Let child threads control which outcomes notify their parent): merged to
mainon 2026-10-15, not in 0.46.1. - Deduplicate covered child completions and explicit/automatic result delivery #3050 (Deduplicate covered child completions and explicit/automatic result delivery): suppresses deliveries already covered by an aggregate. Orthogonal to pacing; a deduplicated notice stream still wakes once per surviving notice.
- A parent should only get a turn end notice for a turn it started #5560 (A parent should only get a turn end notice for a turn it started): filters by who initiated the turn. Complements cadence; both can apply to the same child.
- Parent thread notices do not say who initiated a child thread's turn #4424 (Parent thread notices do not say who initiated a child thread's turn): attribution in the notice text. Does not reduce the number of wakes.
Environment
- bb 0.46.1 installed (desktop app on macOS),
/Users/cristos/Library/.../bb-app, CLI at/Users/cristos/.local/bin/bb. - Source read at
origin/maine1f27dbf30ad9456275d09ee22073766c45ee65f. parentNotificationsis absent from the 0.46.1 CLI and from the installed database schema (pragma table_info(threads)has noparent_notificationscolumn), so Let child threads control which outcomes notify their parent #5578 is unreleased at the time of filing.- Counts taken from
~/.bb/bb.db,eventstable filtered ontype = 'client/turn/requested'andjson_extract(data, '$.systemMessageKind').
What I ruled out
- Not a duplicate of Let a child thread tell its parent only when it finishes, not after every turn #4487: that issue asks which outcomes notify, and Let child threads control which outcomes notify their parent #5578 shipped that. This asks how often qualifying outcomes notify. Filed separately because the acceptance sketches do not overlap and the repo asks for one request per issue.
- Not a duplicate of Deduplicate covered child completions and explicit/automatic result delivery #3050: that suppresses notices already represented by an aggregate result. My 1,323 notices are individual completions, each the sole delivery for its turn.
- Not a duplicate of A parent should only get a turn end notice for a turn it started #5560: that filters notices by turn initiator. A child whose turns the parent started still produces one notice per turn.
- Not fixed by
visibility: hidden: the CLI guide states a hidden child still reports its turns and blockers to its parent. - Not fixed by a larger batch window: the window is a constant at line 78 and only addresses simultaneous completions, not a long series of sequential turns.
Suggested priority and effort (optional)
Medium priority, medium effort. Token and money cost is measurable and ongoing for anyone running an orchestrator with several children: 1,323 wakes in my database, and $12.34 for 26 wakes in the #5560 measurement. A workaround exists (parent-notifications off plus parent polling) but it trades wakes for polling turns rather than removing cost, and it loses failure reporting unless stuck is used. No data loss. Touches the thread schema, the spawn/update CLI and SDK surfaces, and the server-side notification gate, following the shape #5578 established.
Checks
- I searched open and closed issues for the same request.
- If an agent wrote this, the body ends with
> AGENT GENERATED.
AGENT GENERATED
Activity
bb-slop-cop commentedon Oct 20, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotApplied missing classifications:
threadsThis adds notification scheduling beyond the existing outcome filter. Priority is Medium because workarounds exist; effort is High because persistent cadence settings and scheduling lifecycle behavior require a new design across storage and public interfaces. No existing classifications were replaced; all applied values were verified.
No reproduction report or pull request: this is a feature request, not a bug.
SawyerHood commentedon Oct 20, 2026
Backlog comparison: coordinate with #4487 and #5560, but keep this cadence request separate.
#4487 asks for explicit completion-only reporting while retaining failure/interruption reporting. #5560 asks for parent-origin filtering and distinct script provenance. This issue instead requests every-N-turn or idle-interval batching, urgent-outcome bypass, and a final flush on archive/stop. None is an exact duplicate of the others.
Also preserve the distinction from merged #5578: auto/stuck/off selects outcomes, not cadence.
stuckstill reports questions andoffsuppresses failures, so it does not fully satisfy #4487 either. Reuse the shared notification policy rather than implementing independent delivery loops.bloodcarter commentedon Oct 22, 2026
Adding a multi-level use case for this cadence request, plus one ask about #5578.
We run a three-level tree: one coordinating thread, several project-lead threads under it, and worker threads under each lead. On bb 0.46.1 (macOS), every worker turn end wakes its lead, and every lead turn end then wakes the coordinator, so routine wakes cascade up the tree. In one hour today, a single lead with five workers was woken 10 times by
child-completednotices, and each of those lead turns woke the coordinator in turn. Every wake is a full-context model request. Because the coordinator is a top-level thread with push levelall, each one also became a push notification to the user.What would solve it for us, per child, set at spawn and changeable with
bb thread update:--parent-notifications stuckkeeps failures, interruptions and question/approval blockers immediate and drops routine completions. That alone removes most of the cascade. 0.46.1 was cut a few hours before Let child threads control which outcomes notify their parent #5578 merged, so we can't use it yet.stuckplus explicit milestones covers the rest.