Skip to content

acp-grok: enable manual compaction; Grok Build handles /compact over ACP #4378

Closed

Description

@sunnymodi21

The workflow

Compact a long Grok Build (acp-grok) thread from bb, using the composer's /compact, bb thread compact, or the compactThread RPC. The Grok CLI supports this, but bb refuses.

What happens today

On an idle acp-grok thread:

$ bb thread compact thr_98xg7wu7ys
Error: HTTP 409: Provider "acp-grok" does not support manual context compaction

The server's capability gate rejects the request before the provider-acp bridge is consulted. The /compact affordance isn't offered for Grok threads.

Observed: Grok Build's ACP mode advertises /compact and handles it as a command. With grok agent stdio (grok 1.0.41 4220f3b224a6 [stable]), session/new sends an available_commands_update whose 37 commands include compact and context. A session/prompt with the text /compact returned {"stopReason":"end_turn"} with _meta.totalTokens: 0. So Grok handled it without passing it to the model as a user message.

Cause (from source, not verified by running a patched build): this looks like the same static-declaration gap as #2290, which was fixed for acp-omp:

  • acp-grok in known-agents.ts doesn't set supportsManualCompaction, so it inherits the ACP default false. acp-opencode and acp-omp set it to true.
  • The bridge already implements compaction for any ACP agent: startCompaction sends /compact as a session/prompt. compactionOutcomeForEndTurn treats end_turn as completed for every dialect except omp, so the grok dialect needs no bridge changes.

What you would expect

acp-grok declares supportsManualCompaction: true, and bb thread compact / the composer's /compact run Grok's own /compact, as they do for acp-opencode and acp-omp.

Suggested change, in plugins/provider-acp/src/known-agents.ts:

     visibility: "installed",
     dialect: "grok",
+    supportsManualCompaction: true,
     fork: "none",

Context and alternatives

  • Unverified: I only exercised /compact on a one-turn session. I didn't confirm that Grok shrinks the context of a long session, or check what it replies on success, "nothing to compact" or failure. If Grok reports failures in its message text, the grok dialect may need a compactionOutcomeForEndTurn branch like omp's.
  • Workaround: a custom ACP agent with a different id, dialect: "grok" and supportsManualCompaction: true works today, but it shows up as a second Grok provider. Custom agents can't override the reserved acp-grok id.
  • Not a duplicate: compactThread returns 409 for acp-omp although the provider-acp bridge already implements /compact #2290 is the same gap for acp-omp and is closed; no open or closed issue covers acp-grok.
  • Environment: bb 0.43.4 desktop app, macOS arm64. Source checked at main 9c9bae7.
  • Found in: bb thread thr_7tdk79zn5d.

Checks

  • I searched open and closed issues for the same request.
  • If an agent wrote this, the body ends with > AGENT GENERATED.

AGENT GENERATED

Activity

  1. added theissue type on Sep 26, 2026
  2. added
    providers
    provider-acp
    confirmed-repro
    on Sep 26, 2026
  3. bb-slop-cop commented on Sep 26, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    Classification: Bug · Priority Medium · Effort Low · labels providers, provider-acp, confirmed-repro.

    Report: https://get-bb.github.io/reports/issues/4378.html · Verdict: REPRODUCED · Confidence: high. The built-in Grok ACP provider lacks the manual compaction capability, so the server returns HTTP 409 before dispatch. Reproduction label: confirmed-repro; the public route regression failed in two clean trusted checkouts and passed after the fix. A long live Grok session was not tested.

    Pull request: #4386

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-reproprovider-acpproviders

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions