Repository navigation
Description
1. Summary
When an ACP agent settles background work after the client-owned prompt has completed — OMP's async-job auto-delivery is the concrete case — the only v1-legal way to surface that work is a private, capability-gated notification asking the client to prompt again. OMP is preparing exactly that (option (b) in can1357/oh-my-pi#9157: initialize _meta capability + _-prefixed wake notification + parked delivery, already endorsed by two other ACP consumers). bb has no consuming half:
handleAgentNotificationdrops every notification that is notsession/update— a wake has no entry point.- No path synthesizes a client turn on an agent's behalf:
client/turn/requestedhassourceproducers only for spawn/tell. activeBackgroundAgentCountcounts only Claude-CodebackgroundTaskrows, so bb cannot even show that an ACP agent has work in flight.
This tracks the bb side: capability handshake, notification routing, synthetic resume, and background-task materialization. It is the delivery half of #2122 (which tracks rendering of unprompted session/update frames): on OMP 18.x there are no frames to render — verified live in production below. Work shipped to git while the thread sat idle forever.
2. Versions and environment
- bb 0.40.1-nightly.32914368061.1 (desktop, macOS arm64); source audited at
d3f7a90(main). - Provider
acp-omp: OMP 18.0.5 viaomp acp. - Production thread
thr_5esghkmr5x, window 2026-08-26 00:50–01:06 UTC. - Also verified at
d3f7a90: neither Vouch agent-initiated ACP turns so async job delivery renders #2123 nor Bracket agent-initiated ACP turns so unprompted work renders #2220 is merged — this build ships no vouched-turn code, so nothing on the bb side catches any shape of this failure.
3. Steps to reproduce
- Start a thread on
acp-ompand give the agent work that ends the turn with background agents still running (OMP's "ending the turn for auto-delivery" — its core resume mechanism). - Wait minutes for the agents to settle.
- OMP resumes the orchestrator detached inside its own process; the follow-up turn runs to completion (verification gate, commit, final summary).
- The bb thread never reacts: no turn, no message, no error; idle forever.
4. Expected vs actual
Observed live (all UTC, 2026-08-26):
00:50:37 turn/completed — orchestrator ends turn, 2 background agents in flight
01:01–01:04 agents finalize inside OMP
01:05:32–53 OMP's detached resume completes: verification gate passes,
commit 75e0691 lands 01:05:34 (14 files, +793/−149),
close-out summary written to the OMP session transcript only
bb events: zero turn events; one acp/fs/write at 01:05:32 surfaced as a
hidden provider/unhandled row; no session/update of any kind
Expected: the thread reports the follow-up (summary + commit), or at minimum a resumable state. Actual: complete silence — the work exists only in git and ~/.omp/agent/sessions/, and the user has to learn it shipped from elsewhere.
5. Evidence
Each side of the gap, at d3f7a90:
- Routing:
handleAgentNotificationinpackages/provider-bridge-acp/src/bridge/bridge.ts(L2504–L2511) returns immediately for anymethod !== "session/update"— everything else an agent sends is dropped without logging. - Turn initiation:
packages/domain/src/thread-events.tstypesclient/turn/requestedwithsource: z.enum(["spawn", "tell"])(L119) — no producer can express an agent-initiated request, even thoughinitiatoralready includes"agent"(invariant comment at L121) andcontinuationOfRequestIdexists unused (L117–118). The event surface is half-ready. - Visibility:
activeBackgroundAgentCountis SQL overbackgroundTaskrows that ACP providers never write — bb cannot show "N agents running" for OMP. - Send path: the provider-retry plumbing (
continueCandidate,plugins/provider-retry/src/service.tsL505) already sends agent-only continuations with a legible decline (input-not-accepted when the session can't accept) — the same shape a wake-answer needs. - Agent side: ACP: async-job auto-delivery turns reach clients unbracketed; allowAgentInitiatedTurns never enabled can1357/oh-my-pi#9157 option (b) —
agentCapabilities._meta["oh-my-pi"].agentWake/clientCapabilities._meta["bb.dev"].agentWakehandshake,PromptResponse._meta.pendingAsyncJobs, an_-prefixed wake notification, and delivery parked on the existing hidden-message queue until the client prompts.
6. What I ruled out
- Not the rendering layer (provider-acp silently drops agent-initiated turns (unprompted session updates, e.g. OMP async-job delivery) #2122 / Bracket agent-initiated ACP turns so unprompted work renders #2220 vouched turns): on OMP 18.x zero
session/updateframes arrive after the prompt settles — verified live here, and independently observed in Bracket agent-initiated ACP turns so unprompted work renders #2220's verification against real omp ("never emit session/update once a session/prompt has settled — omp's ACP prompt handler returns early"). There is nothing to bracket. - Not agent reaping: the
omp acpprocess stayed alive through the whole window and completed the follow-up in-process. - Not permission stalls:
tools.approvalMode: yolo. - Not OMP failing to resume: the detached resume ran and finished; the loss is at the ACP boundary.
- Not fixable agent-side alone: ACP v1 forbids continuing a settled turn via
session/update(only_metaand_-prefixed extensions are legal); a wake must be answered by a clientsession/prompt.
7. Suggested priority and effort
Same population as #2122 — every acp-omp thread whose turn ends with background work — now with guaranteed rather than heuristic loss. P1; medium effort, additive and fully gated so nothing changes for agents that don't advertise:
- Advertise
clientCapabilities._meta["bb.dev"] = { agentWake: 1 }at initialize; treatagentCapabilities._meta["oh-my-pi"].agentWakeas the agent-side opt-in. - Route
_-prefixed notifications throughhandleAgentNotificationinstead of dropping them. - On wake: synthetic resume on the existing send path, emitting
client/turn/requestedwithinitiator: "agent"andcontinuationOfRequestId(extend thesourceenum with a"wake"member or equivalent); decline legibly (input-not-accepted) if the session can't accept. - Materialize
backgroundTaskrows for ACP agents with work in flight soactiveBackgroundAgentCountand the UI count them. - Keep the hardening from the Bracket agent-initiated ACP turns so unprompted work renders #2220 review: a wake racing a user prompt can hit omp's
Agent is already processingrejection — queue-and-retry with backoff rather than failing the synthetic turn.
Sequencing: lands after (or with) the OMP-side capability.
Activity
bradhallett commentedon Aug 27, 2026
Upstream status update (2026-08-27):
The busy-detection half of the detect → wait → resume composition landed and shipped: fix(acp): surface session-busy as a typed JSON-RPC error instead of -32603 can1357/oh-my-pi#9825 (merged by can1357) is in omp v18.0.8.
session/promptracing an in-flight turn now returns a typed error:{ "code": -32003, "message": "Agent is already processing. Use steer() or followUp() to queue messages, or wait for completion.", "data": { "reason": "session_busy", "hint": "steer|followUp|wait" } }Settled consumption contract for the resume path: branch on
data.reason === "session_busy"only (hintis display text), treat as transient, retry once idle. Note bb already surfaces the message text today viadata.detailsextraction, so this needs no interim fix — it becomes load-bearing when the synthetic resume lands.Remaining blocker: the wake notification itself — decision pending in ACP: async-job auto-delivery turns reach clients unbracketed; allowAgentInitiatedTurns never enabled can1357/oh-my-pi#9157 (option (b) capability +
_-prefixed notification + parked delivery). No code exists upstream yet; three ACP consumers (bb, Tx Code, Sesori) are waiting on it.bradhallett commentedon Sep 3, 2026
Line item 1 (consume the settled
session_busycontract: queue the prompt, retry once on idle) is up as #3004. It's independently useful regardless of which idle-side design lands in can1357/oh-my-pi#9157, so I split it out rather than holding it behind that decision.The wake-consumption half of this issue stays gated on #9157:
_omp/session/wakerouting, synthetic resume, andbackgroundTaskrows all depend on omp actually emitting the wake notification.Tabulanga commentedon Nov 6, 2026
Reproduced on bb 0.48.1 / OMP 18.17.0, using
openai-codex/gpt-6.1-sol.Steps:
The child finishes, and OMP automatically resumes the parent: both the child’s final answer and the parent’s continuation are present in OMP’s native transcripts.
However, a transparent ACP stdio recorder captured no messages after the initial
session/promptresponse, including 106 seconds after the parent’s native continuation. bb therefore shows no continuation.This was tested in a disposable bb instance without source modifications. The same symptom occurred without the recorder.
Is #2461 the correct tracker? Is there an existing capability/configuration for delivering this continuation, or does it require changes on the OMP and/or bb side?
DiscipulusVitae commentedon Nov 15, 2026
Cross-provider evidence from agy 1.5.9 / Linux arm64 under BB 0.49.0, demonstrating that the need for a generic agent-wake / synthetic-resume mechanism extends beyond OMP.
We documented and independently reproduced this behavior in google-antigravity/antigravity-cli#1461 (comment):
/goal), the first ACP turn settles with{"stopReason": "end_turn"}.session/updateframes reach the client).ask_question/ elicitation), the request is held internally without delivery while the connection is idle. Empty prompts are rejected with-32602 Empty prompt, so the client cannot passively poll for pending interactions.This shows that the lifecycle gap where background work settles outside an active client turn is not unique to OMP. A provider-neutral wake capability handshake and synthetic resume path in
provider-acpwould provide a robust, unified consumption model for both OMP and Antigravity runtimes.