Repository navigation
Description
1. Summary
An ACP agent that emits session updates with no prompt in flight — i.e. an agent-initiated (unprompted) turn, such as OMP's async-job auto-delivery resuming the agent after a background job settles — has all of that output dropped by the provider-acp bridge. The agent runs, streams text and tool calls, and the bb thread shows nothing: no turn, no message, no error. The work is silently lost.
2. Versions and environment
- bb 0.39.0 (desktop app, macOS 15 / Darwin 27, arm64); code path re-verified against
mainatc9aef75145268906a58c054641e183ee89418847. - Provider: OMP (oh-my-pi) 17.4.0 (Homebrew) over the ACP bridge (
omp acp). Any ACP agent that produces unprompted updates is affected; OMP is the concrete case because its async-job completion follow-up turns are agent-initiated by design. - Nothing unusual: local daemon, default data dir,
tools.approvalMode: yolo(rules out permission stalls).
3. Steps to reproduce
Closest faithful repro is a unit test at the exact code path (live repro needs OMP; marked unverified live beyond the observation below):
pnpm -C plugins/provider-acp testwith a test that, after a normal prompt turn completes, driveshandleLinewith unsolicitedsession/updatenotifications: auser_message_chunk(OMP echoes the injected job result) followed byagent_message_chunks.- Before the fix: zero
turn/started/item/*events reach the thread — the updates vanish. - After the fix (branch
fix/acp-agent-initiated-turnson my fork): the bridge opens a vouched turn, the chunks render as an agent message, and the turn settles.
The fake-agent behaviors spontaneous-stream:N / spontaneous-noise in src/bridge/fake-acp-agent.mjs on that branch encode this wire shape exactly.
Negative space: updates arriving while a prompt is in flight render fine; the drop only affects the no-prompt-in-flight window. Non-work updates (e.g. available_commands_update, usage_update) are correctly invisible either way.
4. Expected vs actual
Observed live (thread thr_8c5qxujrpw), from the events table in ~/.bb/bb.db:
turn/completed bt1113dc70-1-2 created_at 1787273348808 (00:49:08Z)
<- OMP job bg_4 settles 00:49:21Z; agent runs an
unprompted follow-up turn and streams a response ->
client/turn/requested created_at 1787274074384 (01:01:14Z, next user message)
Actual: zero persisted events between those timestamps — no turn, no items, no error. Expected: a turn containing the agent's async-delivery message, same as any other agent output.
5. Evidence
- Root cause, pre-fix on
main@c9aef75:handleAgentNotificationforwardssession/updateto the translator with no turn bracketing when no prompt is in flight (ACP itself sends noturn_startedfor agent-initiated output).noTurnFallbackForclassifies those updatesunhandledwithonlyIfNoTurn: true— invisible by design for noise, fatal for real agent work.user_message_chunkis classified as noise (input-echo suppression), which is correct for echoes and also swallows OMP's async-result injection — but the message chunks alone already carry the loss.
- Provider-side confirmation: a standalone probe against
ompshowed the agent emittinguser_message_chunk+agent_message_chunks aftersession/promptreturned — the bytes reach the bridge and are dropped there. - The sanctioned escape hatch already exists:
docs/provider-bridge-protocol.mdturn lifecycle rule 3 permits bridge-emittedturn.openfor turns the user did not initiate (the compaction path already uses it; the claude-code translator auto-opens turns on streamed text).
6. What I ruled out
- Not a permission/approval stall:
approvalMode: yolo, no pending permissions at the time. - Not daemon/provider reaping: the
omp acpprovider process for the thread stayed alive across the window (verified by PID/elapsed). - Not OMP failing to emit: wire probe shows the updates on stdout.
- Not the DB write path: streaming deltas during prompted turns persist fine in the same thread.
- Searched open/closed issues; nothing covers unprompted ACP session updates being dropped.
7. Suggested priority and effort
Hits every OMP-over-ACP user who uses background jobs (auto-delivery is OMP's core resume mechanism); output is silently lost with no user-side workaround; fix is bridge-local with no wire changes. I'd guess P1-ish, small effort. Suggested fix in the linked PR: the bridge vouches the turn (emits the existing bridge turn-started command) when idle agent-work updates arrive, settles it on a quiet window / before the next bb-initiated turn / on stop; non-work updates stay noise.
AGENT GENERATED: by zai/glm-5.3
Activity
SawyerHood commentedon Aug 21, 2026
Reproduction & root-cause report: https://get-bb.github.io/reports/issues/2122.html
The report has copy-paste repro steps, screenshots where the bug is visual, code permalinks at the base commit, and repro artifacts. It was independently re-run by a second agent (see its Verification section).
bradhallett commentedon Aug 24, 2026
Correction to §5 ("zero persisted events"), confirmed against the reproduction report: pre-fix on current main, the unsolicited chunks do persist — as thread-scoped
provider/unhandledrows that the timeline hides unlessshowUnhandledProviderEventsis enabled. The user-visible outcome is unchanged (dropped work), but the events table contains the rows.#2123 is being updated to settle vouched turns on every exit path — including agent exit and session errors, per the report's hang finding — and will document the changes on the PR.
Bracket agent-initiated ACP turns so unprompted work renders (#2122)
Bracket agent-initiated ACP turns so unprompted work renders (#2122)
Bracket agent-initiated ACP turns so unprompted work renders (#2122)
bradhallett commentedon Aug 26, 2026
Live production specimen on OMP 18.0.5 — it confirms a frame-level dead end for the bracket approach on current omp, and the structural fix is now tracked on both sides.
Timeline (production thread
thr_5esghkmr5xonacp-omp, bb 0.40.1-nightly, all UTC 2026-08-26):The work shipped; the thread never reported it. Two consequences:
The vouched-turn bracket can't catch 18.x. Bracket agent-initiated ACP turns so unprompted work renders #2220's own verification already observed real omp "never emit[s]
session/updateonce asession/prompthas settled — omp's ACP prompt handler returns early"; this is that behavior in production, on 18.0.5, with the follow-up turn fully completing invisibly. There are no frames to bracket. My second hardening suggestion on Bracket agent-initiated ACP turns so unprompted work renders #2220 (classifyacp/fs/writeas agent work) would have opened a bracket around the file write — but the orchestrator's close-out message still never crosses the wire, so at best you'd render an empty-looking turn around a commit. The bracket remains the right fix for any agent that does stream unprompted updates (omp 17.4.0 did); it just can't reach the current one.The delivery has to originate agent-side. OMP tracks it at ACP: async-job auto-delivery turns reach clients unbracketed; allowAgentInitiatedTurns never enabled can1357/oh-my-pi#9157 — maintainer weighing (a) wait for ACP v2/RFD, (b) private
_metacapability, (c) restore in-prompt draining. (b) is endorsed there with a full wire design: capability-gated_-prefixed wake notification + parked delivery, answered by a clientsession/prompt. The bb consumption half — routing_-prefixed notifications (todayhandleAgentNotificationdrops them), synthetic resume via the provider-retry send path, andbackgroundTaskmaterialization soactiveBackgroundAgentCountcounts ACP agents — is filed at provider-acp: no consumption path for agent-wake notifications — ACP agents with settled background work can't be resumed (OMP async-job delivery) #2461. The busy-rejection hardening from my Bracket agent-initiated ACP turns so unprompted work renders #2220 comment stays necessary under that design too: a wake racing a user prompt into omp'sAgent is already processingrejection should queue-and-retry, not fail the synthetic turn.#2122 stays open as the right tracking issue for the rendering layer (any agent emitting unprompted
session/updatestill needs the bracket); the 18.x delivery loss routes through #2461 + the OMP side.Add an opt-in rebuilt ACP adapter, agent options in the model picker,…