Repository navigation
[Bug]: /compact on ACP registry agents (e.g. Devin) fails at turn start — adapter never sets supportsCompaction #16663
Description
Activity
Note
Grok responding on behalf of Julius.
Confirmed on current
main(f8ed2a0). Clear eng bug: UI advertises Compact for ACP-registry agents that expose acompactslash command, but the adapter never opts into compaction, so the orchestrator fails the turn beforesession/prompt.What main does
- UI enablement (works).
providerSupportsManualCompactionis purely slash-command based:
// apps/web/src/components/chat/ContextWindowMeter.logic.ts return provider?.snapshot.slashCommands.some((command) => command.name === "compact") ?? false;
#16021(merged) feedsavailable_commands_updateinto the provider snapshot’sslashCommands, so Devin (and any other registry agent that advertisescompact) gets the Compact affordance.- Dispatch (broken). Bare
/compact(no attachments) is special-cased inRunExecutionServiceand routed tosession.compactThread, notstartTurn:
// apps/server/src/orchestration-v2/RunExecutionService.ts (~1376-1389) const compact = input.message.attachments.length === 0 && input.message.text.trim().toLowerCase() === "/compact"; const startTurn = compact ? (input.session.compactThread?.(turnInput) ?? Effect.fail( new ProviderAdapterTurnStartError({ /* ... */ cause: "This provider does not support context compaction.", }), )) : input.session.startTurn(turnInput);
That matches the reported
ProviderAdapterTurnStartErrorwith nosession/prompt.- Adapter gap.
AcpAdapterV2only attachescompactThreadwhen the flavor setssupportsCompaction: true(and that helper just rewrites the message to/compactand callsstartTurn):
// apps/server/src/orchestration-v2/Adapters/AcpAdapterV2.ts (~7393-7400) ...(flavor.supportsCompaction === true ? { compactThread: (turnInput) => startTurn({ ...turnInput, message: { ...turnInput.message, text: "/compact" }, }), } : {}),
- Antigravity / Grok ACP flavors set
supportsCompaction: true(AntigravityAdapterV2.ts~225,GrokAdapterV2.ts~255). makeAcpRegistryAdapterV2never sets it — the flavor only wires driver/capabilities/Devin+Mistral exceptions/runtimeCoordinator hooks (AcpRegistryAdapterV2.ts~190-239). NosupportsCompactionsymbol in that file on main.
So any ACP-registry agent that advertises
compactgets a button that cannot succeed. The attachment workaround in the report is real: non-emptyattachmentsskips the compact special-case and goes throughstartTurn→session/prompt.Related (not duplicates)
Ref Notes #16021 (merged) Added local ACP slash commands → UI enablement path. #5412 (closed) Grok /compact+ compaction feedback — different flavor, already sets the flag.#11276 (closed) Devin via ACP — landed the provider, not this compaction gate. #10164 / #10959 (open) Compaction notification / Claude status UX — unrelated to registry supportsCompaction.Fix direction (no open fix PR found)
Agree with the reporter: set
supportsCompaction: trueon theacpRegistryflavor. ExistingcompactThreadalready forwards/compactviastartTurn, which is what Devin expects over ACP. Optionally also gate runtime compact on the capturedslashCommandsfor defense in depth. No open PR from stilak12 (or anyone else) targets this; issue has no comments / linked PRs yet.Verdict: valid eng bug — ready to track / fix.
- UI enablement (works).
- addedbugSomething is broken or behaving incorrectly.Something is broken or behaving incorrectly.via-triageFiled through npx t3 triageFiled through npx t3 triage
on Oct 7, 2026
Area: apps/server
Steps to reproduce
compactslash command viaavailable_commands_update(e.g. Devin,acpRegistry_devin)./compact(or click Compact context in the context-window meter popover).Expected behavior
The
/compactcommand is forwarded to the agent and conversation compaction runs (Devin handles/compactnatively over ACP and emitscompaction_updatenotifications, whichAcpRuntimeModelalready maps to a "Compact context" tool-call row).Actual behavior
The run fails immediately (~500ms) with:
The provider event log shows
initializeandsession/loadsucceed, then the run fails —session/promptis never sent:Impact
Minor bug or occasional failure — compaction is unreachable for every ACP-registry provider, and the UI actively offers a command that cannot succeed.
Root cause
Two capability signals disagree:
Enablement (works): since feat(acp): support local provider commands #16021 ("feat(acp): support local provider commands"),
available_commands_updateis normalized into the provider snapshot'sslashCommands. The web UI enables compact whensnapshot.slashCommands.some(c => c.name === "compact")(providerSupportsManualCompactioninContextWindowMeter.logic.ts). Devin advertisescompact, so the UI offers it.Dispatch (broken): the orchestrator special-cases a message whose trimmed text is exactly
/compactand routes it tosession.compactThread(...)instead ofsession.startTurn(...).compactThreadis only attached when the adapter flavor setssupportsCompaction: true. The Antigravity and Grok ACP flavors set it;AcpRegistryAdapterV2's flavor does not → the call hitscompactThread?.() ?? fail(ProviderAdapterTurnStartError("This provider does not support context compaction."))and the run dies beforesession/prompt.Suggested fix
Set
supportsCompaction: trueon the acpRegistry flavor. The existingcompactThreadimplementation just callsstartTurnwithmessage.text = "/compact", which is correct for any agent that advertises the command — and the UI already gates on advertised commands, so agents that don't advertisecompactnever get the affordance. (Optionally also gate on the capturedslashCommandsif you want the runtime side to be defensive too.)Environment
0.0.46-nightly.20261005.2702(macOS arm64); still present onmain3000.11.3viaacpRegistry_devin(devin acp), which advertises 95 commands includingcompactdevin acpaccepts/compactviasession/promptdirectly (returnsend_turn, emitscompaction_update)Workaround for users
Attaching any file to the message bypasses the compact dispatch (
attachments.length === 0check), so the prompt goes throughsession/promptand the agent parses/compactitself.Generated with Devin