Repository navigation
Description
1. Summary
Asking bb to compact an acp-omp (omp) thread is rejected with
409 Provider "acp-omp" does not support manual context compaction, so the
composer hides/disables the /compact affordance and plugins calling the
compactThread RPC fail. The rejection happens in the server's capability
gate, before the provider-acp bridge is ever consulted — and that bridge
already implements manual compaction end-to-end by sending the agent's own
/compact command as a session/prompt maintenance turn. Only the static
per-agent capability declaration is wrong: acp-omp still carries the ACP
tier default (supportsManualCompaction: false) while acp-opencode
overrides the same flag to true.
2. Versions and environment
- bb desktop app (audited install), audit window 2026-08-20 → 2026-08-22.
- Source-level verification against
mainatfff3ae8(all source links below use that commit). - Provider:
acp-ompvia the first-partyprovider-acpplugin bridge, which
spawnsomp acpper thread. OMP nightly build (oh-my-pi,
github.com/can1357/oh-my-pi). - OS: macOS (arm64). No remote/worktree/custom-port specifics; standard data
dir. - Investigation: bb thread
thr_cz6spq5br5(2026-08-22 integration audit,
post-mortem Issue 4a).
3. Steps to reproduce
- Install the omp CLI and sign in (
omp login), so bb lists the omp
provider (acp-omp). - Start a thread on the omp provider and run a few turns so the context
grows. - Trigger manual compaction either from the composer's
/compactbuiltin
or via the RPC surface:POST /api/v1/threads/<threadId>/compact(this
is what the communitycontext-compactplugin calls). - Observe the failure. Smallest repro is the HTTP call alone on an idle
omp thread; no turn content matters.
Negative space: the same call succeeds on acp-opencode threads (the one
ACP agent whose declaration overrides the flag), and on codex, pi, and
claude-code. Compacting an active thread correctly 409s on every
provider with the status message — the defect is specifically the
capability answer for acp-omp.
4. Expected vs actual
Actual (plugin log line, 2026-08-22 07:06:10 UTC, audit window):
[plugin:context-compact] rpc compactThread failed: HTTP 409: Provider "acp-omp" does not support manual context compaction
Direct HTTP repro answers the same body:
{"error":{"code":"invalid_request","message":"Provider \"acp-omp\" does not support manual context compaction"}}Expected: 200, one turn dispatched carrying the standalone builtin
/compact command input. The provider-acp bridge recognizes that input and
runs the agent's own /compact command as a provider-local maintenance
prompt (session/prompt with text /compact), then reports it through the
acp/compaction/started / acp/compaction/completed envelopes, which the
bridge's delta translator emits as a contextCompaction turn and — only on
a completed one — a thread/compacted event. That entire path exists and is
tested today; it is simply unreachable for acp-omp.
5. Evidence
- The server gate that produces the 409:
apps/server/src/routes/threads/actions.ts#L140-L146
—compactThreadContextthrows before any bridge traffic when
providerRegistry.supportsManualCompaction(thread.providerId)is false. - How the registry answers for
acp-omp: plugin registrations win over the
dynamic tier —
services/providers/provider-registry.ts#L453-L464. - The wrong declaration:
ACP_BASE_CAPABILITIESdefaults
supportsManualCompaction: false
(plugins/provider-acp/server.ts#L21);
theacp-ompentry spreads it unmodified
(L137),
whileacp-opencodeoverridessupportsManualCompaction: true
(L112-L115).
The bridge's own doc comment states the intended contract: the affordance
is gated by "the provider declaration or custom-agent config"
(bridge.ts#L2088-L2095). - The bridge implementation that never gets consulted:
startCompactionsendssession/promptwith text/compact
(bridge.ts#L2096-L2121);
the dispatch recognizes bb's standalone builtin/compactmention
(L2535-L2538);
the translator emitsthread/compactedonly for completed compactions
(delta-translation.ts#L747-L769);
covered bybridge.test.ts("runs the builtin /compact command as
compaction, not as a prompt"). - omp-side behavior: omp executes builtin slash commands from prompt text
(its ACP mode received and ran/compact-class commands during the audit
window; OMP session transcripts show compaction running). The bridge also
fails the turn legibly rather than pretending success when an agent lacks
the command, so flipping the declaration for omp does not weaken the
per-agent honesty for agents that genuinely lack/compact
(cursor/grok/hermes stayfalse). - The 409 log line and the audit method are in the investigation report
(bb threadthr_cz6spq5br5, post-mortem "Issue 4 — Capability gaps", item 1).
6. What you ruled out
- Not a bridge gap:
startCompactionand its envelopes/translator/tests all
exist at the base commit; the 409 is thrown server-side before any bridge
process sees the request. - Not a duplicate of pi provider: no way to manually compact a thread's context #1103 (closed) or Add manual context compaction across providers #1152 (merged): Add manual context compaction across providers #1152 added manual
compaction but explicitly excluded ACP providers; that exclusion predates
the bridge's/compactmaintenance-prompt flow, so its premise no longer
holds for omp. This issue supplies the new evidence (bridge already
implements compaction; omp accepts/compact). - Not an omp-side protocol gap: ACP has no compaction method and omp
advertises no compaction config option, but bb's bridge deliberately does
not need one — it routes throughsession/prompt, per its own doc comment. - Still present at
main@fff3ae8: theacp-ompdeclaration still
spreads thefalsedefault (verified by reading the source, not by a live
repro onmain). - Not data loss or corruption: the request is refused outright; no partial
compaction occurs.
7. Suggested priority and effort
Low priority, small effort. Every omp-thread user loses the manual
context-shrink lever on long threads (the affordance is gated off), with no
UI workaround, but nothing is lost or corrupted. Fix is a one-line
per-agent capability override in plugins/provider-acp/server.ts matching
the existing acp-opencode pattern, plus test-table/test-case updates
(the public compaction suite and the first-party capability table).
AGENT GENERATED
Activity
bradhallett commentedon Aug 22, 2026
Live production evidence that the bridge compaction path works end-to-end for acp-omp — gathered today (2026-08-22) on a real thread, independent of this PR's tests.
A local auto-compaction plugin (context-compact) queues
/compactfor busy threads instead of calling the direct RPC. On threadthr_4tm7g4ie78(provideracp-omp, OMP 17.4.1) the queued command drained at the turn boundary and executed a real compaction through the provider:Sequence numbers on the thread's event log: 19648 (prior turn/completed), 19649–19652 (the
/compactturn: requested/started/contextCompaction/input-accepted), 19656 (thread/compacted), 19657 (turn/completed). Provider session id01a027f5-2537-7000-98be-c1612765f2f8is stable across all four.Two conclusions:
createStandaloneBuiltinCompactCommandInput→ bridge →session/prompt "/compact"). The compaction above completed successfully at 14:38:17Z.supportsManualCompaction: falseinACP_BASE_CAPABILITIES) blocking the idle/directcompactThreadRPC. Busy threads are servable today only because the queue path never consults that gate.So the declaration flip in this PR doesn't enable an untested path — it un-gates the direct RPC onto a path production already exercises successfully.
SawyerHood commentedon Aug 24, 2026
---Auto-Generated---
Reproduction & root-cause report: https://get-bb.github.io/reports/issues/2290.html
supportsManualCompaction: trueto theacp-ompentry in plugins/provider-acp/src/known-agents.ts (verified: PR tests + repro pass, typecheck green, live POST returns 200; no protocol bump needed since the flag is server-internal); update the first-party capability table test and add the acp-omp 200-path case to public-thread-compaction.test.ts. (2) In packages/provider-bridge-acp startCompaction, detect omp's agent message 'Compaction failed: …' during the compaction prompt and finish with status failed — or treat 'Nothing to compact (session too small)' / 'Already compacted' as a s…thread tellin step 06 did not append a provider turn, so both compaction attempts hit the same small session. The…The report is self-contained: copy-paste repro steps with the test or script inline, expected vs actual output, screenshots where the bug is visual, and code permalinks at the base commit. It was independently re-executed by a second agent (see its Verification section).
fix(provider-acp): report omp's failed /compact honestly
fix(provider-acp): report omp's failed /compact honestly
fix(provider-acp): report omp's failed /compact honestly
fix(provider-acp): declare manual compaction support for omp (#2293)