Repository navigation
[Bug]: /compact on ACP registry agents (e.g. Devin) fails at turn start — adapter never sets supportsCompaction #16663
Description
Area: apps/server
Steps to reproduce
- Add an ACP registry agent that advertises a
compactslash command viaavailable_commands_update(e.g. Devin,acpRegistry_devin). - Open a thread on that provider and send a message or two.
- Send
/compact(or click Compact context in the context-window meter popover).
Expected behavior
The /compact command is forwarded to the agent and conversation compaction runs (Devin handles /compact natively over ACP and emits compaction_update notifications, which AcpRuntimeModel already maps to a "Compact context" tool-call row).
Actual behavior
The run fails immediately (~500ms) with:
Provider error — "The provider could not start this turn. Retry the turn; if it keeps failing, check the provider setup and server logs."
The provider event log shows initialize and session/load succeed, then the run fails — session/prompt is never sent:
01:00:46.541 initialize → succeeded
01:00:46.585 session/load → succeeded
01:00:47.079 run failed → ProviderAdapterTurnStartError
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: true on the acpRegistry flavor. The existing compactThread implementation just calls startTurn with message.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 advertise compact never get the affordance. (Optionally also gate on the captured slashCommands if you want the runtime side to be defensive too.)
Environment
- T3 Code:
0.0.46-nightly.20261005.2702(macOS arm64); still present onmain - Agent: Devin
3000.11.3viaacpRegistry_devin(devin acp), which advertises 95 commands includingcompact - Verified
devin acpaccepts/compactviasession/promptdirectly (returnsend_turn, emitscompaction_update)
Workaround for users
Attaching any file to the message bypasses the compact dispatch (attachments.length === 0 check), so the prompt goes through session/prompt and the agent parses /compact itself.
Generated with Devin
Activity
juliusmarminge commentedon Oct 7, 2026
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
providerSupportsManualCompactionis purely slash-command based:#16021(merged) feedsavailable_commands_updateinto the provider snapshot’sslashCommands, so Devin (and any other registry agent that advertisescompact) gets the Compact affordance./compact(no attachments) is special-cased inRunExecutionServiceand routed tosession.compactThread, notstartTurn:That matches the reported
ProviderAdapterTurnStartErrorwith nosession/prompt.AcpAdapterV2only attachescompactThreadwhen the flavor setssupportsCompaction: true(and that helper just rewrites the message to/compactand callsstartTurn):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)
/compact+ compaction feedback — different flavor, already sets the flag.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.