Repository navigation
Description
Problem
BB already knows PR/check/review state in its native GitHub plugin and displays it on the owning environment/thread. A thread can show, for example, checks_pending and later ready_to_merge without a shell GitHub watcher.
That state change does not wake an orchestrator session. Today the agent must poll gh, manually run bb github sync, use a scheduled shell check, or wait for an operator message. The first three duplicate the GitHub plugin's existing cache/sync work; the last loses autonomous continuation.
Observed on BB 0.37.0 with built-in [email protected]:
- plugin and central sync service run successfully;
bb githubexposesrepos, cachedissues, cachedprs, and manualsync;bb thread showexposes the environment PR, check counts/state, review state, mergeability, and attention such aschecks_pendingorready_to_merge;- no plugin command or thread event exposes a subscription/wake for changes to that cached PR state.
Requested capability
Reuse the GitHub plugin's existing sync/delta seam to support an opt-in, exact-thread subscription to semantic PR state changes. Do not add a second GitHub poller.
Smallest useful shape:
- A thread/session subscribes its exact thread ID to one repository plus PR or branch identity.
- The existing GitHub sync detects a semantic change in checks, review, mergeability, or terminal PR state.
- BB emits one coalesced system wake/queued turn to that exact thread, carrying the normalized before/after state and PR identity.
- Unchanged syncs are silent. If the target is active, queue once rather than interrupting or duplicating turns.
- Subscription expiry/removal follows thread/PR terminal lifecycle.
The existing five-minute BB-native GitHub sync may remain the single detector;
"no polling" here means no second shell watcher, cron job, per-thread poller, or
legacy project-owned process. Before sending, the coalescer must durably reserve
the pending wake. An ambiguous threads.send result retains that reservation
and suppresses blind retry rather than risking a duplicate turn.
The mechanism should work for any native BB project. It must not require a legacy llm-collab project owner, marker file, watcher process, visible pointer tell, or per-thread cron.
Acceptance
- One central GitHub sync remains the only GitHub polling source.
- A subscribed exact thread wakes once when a pending check becomes passing or failing, or another configured terminal PR state changes.
- Repeated identical syncs produce no wake.
- Multiple intermediate updates coalesce to the latest semantic state while the target thread is active.
- An ambiguous send result remains pending/inspectable and does not trigger an automatic duplicate send.
- Wrong project/repository/PR/thread identity fails closed; archived/deleted targets do not wake.
- The payload includes repository, PR number, base/head refs and SHA, checks summary, review summary, mergeability/attention, and a stable semantic digest or equivalent dedupe key.
- No GitHub write permission is required; this is read-only observation and BB-local delivery.
Why this belongs in BB
The GitHub plugin already owns the normalized cache and the environment/thread PR projection. Emitting the state-change event there avoids a second daemon, shell watcher, schedule, or project-specific transport. It also lets agent sessions continue from the same canonical state the BB UI displays.
Reproducer: pixexid/bb-collab PR #27 moved from one pending check / checks_pending to one passing check / ready_to_merge; BB displayed both states correctly, but the orchestrator had to perform a new read to discover the transition.
Activity
pixexid commentedon Aug 15, 2026
Observed upstream wake/interaction gap on bb 0.37: requestInput/pendingInteraction is bound to the desktop renderer; the phone web client shows a normal composer. Operator-on-phone flows need global client surfacing or active-device targeting, otherwise a doorbell can point at an approval form the operator cannot reach.
lanjak commentedon Nov 21, 2026
Hi, I'd like a maintainer's sign-off on this feature before #7894 goes up for review. I opened it too early, so I've moved it to draft. Please treat it as a prototype for now.
What #7894 does: the github-pr-status plugin gets
bb pull-request watch. A watched pull request sends one message to its thread when a check fails, all checks pass, someone else comments or reviews, or the branch starts to conflict. The watch ends on merge or close, or after 10 comment-only messages in a row. Everything is inside the plugin, with no daemon change.Happy to change the approach, or close it if you'd rather solve this another way.
lanjak commentedon Nov 21, 2026
Update: I closed #7894. The prototype stays on my fork: main...lanjak:bb:feat-pr-watch (head
62e3190c24).