Skip to content

Let child threads control which outcomes notify their parent - #5578

Merged
ymichael merged 1 commit into
mainfrom
bb/parent-notifications-policy
Oct 15, 2026
Merged

ymichael merged 1 commit into
mainfrom
bb/parent-notifications-policy

Conversation

@ymichael

@ymichael ymichael commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

Every child turn notified its parent, including successful direct follow-ups and replies. Callers could not keep automatic failure/blocker reporting while choosing when to deliver successful results, so orchestrating plugins avoided native child threads.

What changed

  • Add per-child parentNotifications: auto preserves all existing notifications, stuck skips successful completions while keeping failures, interruptions, and approval/question blockers, and off suppresses automatic notifications. Explicit messages remain available; forks retain their existing exclusion.
  • Persist the setting in threads.parent_notifications, with migration and creation defaults of auto. Updates affect future outcomes.
  • Expose it through thread details, existing SDK spawn/update methods, and bb thread spawn/update --parent-notifications. Status/show output and CLI guides describe the policy. Plugin SDK version advances to 0.6.51.
  • Apply the policy on the server across turn outcomes, interactive blockers, setup failures, and exhausted queue retries. No host-daemon wire or protocol changes.

How you verified

  • pnpm exec turbo run test --filter=@bb/server -- test/threads/thread-parent.test.ts test/threads/child-outcome-gaps.test.ts test/public/public-thread-parenting.test.ts test/internal/internal-interactive-requests.test.ts — 53 tests passed across four files after rebasing onto origin/main.
  • pnpm exec turbo run typecheck --filter=@bb/server --filter=@bb/app --filter=@bb/cli --filter=@bb/sdk --filter=@get-bb/plugin-sdk — passed after rebasing onto origin/main.
  • pnpm start:worktree (before rebase) — production build succeeded using Turbo cache; app returned HTTP 200.
  • Created a parent and auto/stuck/off child fixtures through the CLI in the isolated worktree server for manual verification.
  • git diff --check origin/main...HEAD — passed.

AGENT GENERATED

Every child turn woke the parent, including direct follow-ups and replies
to the parent, so orchestrating plugins avoided native child threads.

Threads get a parentNotifications setting: auto (default, today's
behavior), stuck (failed, interrupted, or blocked on an approval or
question; no completions), or off. It is set on create and update through
the API, SDK, `bb thread spawn/update --parent-notifications`, and the
thread details panel, and shown by `bb status` and `bb thread show`.
The bb guide tells a stuck/off child to report results with
`bb thread tell`. Existing threads migrate to auto.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant