Repository navigation
Description
Summary
When an ACP agent compacts its context during a turn, bb shows no compaction row. Claude Code, Codex and Pi threads show a "Compacting context" row that changes to "Compacted context". For ACP agents, bb shows that row only for its own /compact.
ACP has a standard update for this: the compaction_update session update from the session compaction RFD. In ACP v1, an agent sends it only to a client that sets clientCapabilities.session.compaction at initialize. bb does not set this capability, and its ACP translator does not know the update.
Versions and environment
- bb 0.49.0 (desktop), and
mainat 39ad460. - Linux (Arch), Node 26.13.1.
- Provider: a custom ACP agent with automatic compaction. The reference adapters
claude-agent-acp(0.78.0 and later) andcodex-acpsend this update.
Steps to reproduce
- Check out
mainat 39ad460 and install dependencies. - Save this file as
packages/provider-bridge-acp/src/repro-compaction.test.ts:
import { expect, it } from "vitest";
import { createDeltaAssembler } from "@bb/provider-bridge-protocol/assembler";
import { ACP_TURN_STARTED_METHOD, ACP_UPDATE_METHOD } from "./bridge-protocol.js";
import { createAcpDeltaTranslator } from "./delta-translation.js";
it("shows an ACP compaction_update as a compaction row", () => {
const threadId = "t";
const translator = createAcpDeltaTranslator();
const assembler = createDeltaAssembler({ providerId: "acp", entropyPrefix: "e", textDeltaFlushMs: 0 });
const run = (method: string, params: Record<string, unknown>) =>
assembler.assemble({
threadId,
deltas: translator.translateAcpEvent({ jsonrpc: "2.0", method, params: { threadId, ...params } }, { threadId }),
});
run(ACP_TURN_STARTED_METHOD, {});
const events = [
...run(ACP_UPDATE_METHOD, { update: { sessionUpdate: "compaction_update", compactionId: "cmp_1", status: "in_progress" } }),
...run(ACP_UPDATE_METHOD, { update: { sessionUpdate: "compaction_update", compactionId: "cmp_1", status: "completed" } }),
];
expect(events.map((event) => event.type)).toEqual(["item/started", "item/completed", "thread/compacted"]);
});- Run
pnpm exec turbo run test --filter=@bb/provider-bridge-acp -- src/repro-compaction.test.ts.
Expected vs actual
Expected: a contextCompaction item starts and completes, and the thread records thread/compacted, as for Claude Code, Codex and Pi.
Actual:
AssertionError: expected [ 'provider/unhandled', …(1) ] to deeply equal [ 'item/started', …(2) ]
- Expected
+ Received
[
- "item/started",
- "item/completed",
- "thread/compacted",
+ "provider/unhandled",
+ "provider/unhandled",
]
In a live thread, the agent does not send compaction_update, because bb does not set the capability. It sends its fallback instead. A custom agent that reported compaction as a think tool call showed in the timeline as "Thought" with the text {"afterTokens":84783,"beforeTokens":120388}. A user read the thread as stalled during compaction, but the compaction took less than one second.
Evidence
initializesends nosession.compactioncapability: agent-connection.ts#L357-L371.translateUpdatesends an unknown session update tounhandledDeltas: delta-translation.ts#L894-L895.compaction_updateis not in the known update kinds: visibility.ts#L28-L36.- The reference adapters document the capability gate and their fallback: codex-acp docs/session-compaction.md, claude-agent-acp src/context-compaction.ts.
What you ruled out
- Not a duplicate. Searched open and closed issues and PRs for "compaction_update", "ACP compaction" and "session compaction". compactThread returns 409 for acp-omp although the provider-acp bridge already implements /compact #2290 and Enable manual compaction for built-in Grok ACP provider #4386 are about manual
/compact, not automatic compaction. - Still happens on
mainat 39ad460. - Manual
/compactthrough bb works. Only compaction that the agent starts itself is not shown. - Open PR Provider session contract: explicit phases, one admission gate, declared settings #7538 changes bb's manual compaction code, but not
compaction_update.
Suggested priority and effort
Low priority, small effort. The problem occurs for each ACP agent with automatic compaction. The thread keeps all data, but the user cannot see that compaction occurred.
AGENT GENERATED
Activity
bb-slop-cop commentedon Nov 18, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotClassification: Bug · Priority: Low · Effort: Medium. Labels:
providers,provider-acp,confirmed-repro.Reproduction report: REPRODUCED · Root-cause confidence: high.
ACP initialization omits session-compaction support, and automatic compaction updates fall through to
provider/unhandledinstead of producing compaction timeline events. A newly authored two-test reproduction fails for those reasons in two clean checkouts of3c8f94a21d; the existing translation suite passes all 91 tests. Live adapter/UI behavior was not exercised.No PR: A complete repair changes the advertised ACP capability and notification contract, outside this rule’s simple-fix safety scope.
Show automatic compaction of ACP agents as a compaction row (get-bb#7752