Repository navigation
Fix OpenCode question routing in ACP sessions - #4695
Merged
Merged
Conversation
ymichael
marked this pull request as ready for review
October 2, 2026 05:37
SawyerHood
pushed a commit
that referenced
this pull request
Oct 5, 2026
## Human comments ## What was wrong The built-in Grok ACP provider inherited the ACP default of `supportsManualCompaction: false`. The server rejected compaction with HTTP 409 before dispatching to the ACP bridge. The verified [reproduction and root-cause report](https://get-bb.github.io/reports/issues/4378.html) records the failure in two clean checkouts. ## What changed Enabled manual compaction for the built-in Grok ACP provider, extended the public thread compaction test to cover its request, updated the existing provider expectation, and documented the CLI behavior in the ACP provider skill. No protocol or wire fields changed. The bridge already sends `/compact` as a `session/prompt` for every ACP agent and treats `end_turn` as completed for the `grok` dialect, so no bridge change is needed. Rebased onto current `main` (`95ec22f22c`) to resolve a conflict in the ACP provider skill doc with the OpenCode question-tool paragraph added in #4695. Both paragraphs are kept. ## How you verified - Before the fix (capability line removed, rebased tree): `routes acp-grok compaction onto the bridge's /compact turn` fails with `{"code":"invalid_request","message":"Provider \"acp-grok\" does not support manual context compaction"}: expected 409 to be 200`. - After the fix: `public-thread-compaction.test.ts` and `first-party-provider-plugins.test.ts` pass (2 files, 8 tests). - `bb-plugin-provider-acp` tests pass (68), and `@bb/provider-bridge-acp` tests pass (348 passed, 4 skipped). - `pnpm exec turbo run lint typecheck` passes for `@bb/server`, `bb-plugin-provider-acp`, and `@bb/provider-bridge-acp`. - `git diff --check origin/main` passes. Not verified: a live, long Grok Build session compacting end to end. Grok's reply text for failures or "nothing to compact" is untested, so the `grok` dialect reports any `end_turn` as completed. Fixes #4378 > AGENT GENERATED 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: bb-slop-cop[bot] <316425484+bb-slop-cop[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Human comments
What was wrong
OpenCode can expose its native
questiontool in ACP sessions even though BB has no handler for that question extension. Calling it never creates a BB interaction and can leave the turn waiting indefinitely.What changed
Launch OpenCode sessions with
OPENCODE_CLIENT=acpandOPENCODE_ENABLE_QUESTION_TOOL=falseafter merging inherited and custom launch environment values. This removes the unsupported native tool while preserving the ask-user-question plugin’sAskUserQuestiontool. The shared path covers new, resumed, forked, and rebuilt sessions, including custom agents declaring the OpenCode dialect. Other ACP dialects and user configuration files are unchanged. Updated provider guide, skill, and configuration documentation. No API, CLI, database, or server/daemon wire changes.How you verified
pnpm exec turbo run test lint typecheck --filter=@bb/provider-bridge-acp: 332 tests passed, 4 skipped; lint and typecheck passed.questionis present under the control environment and absent under the fixed environment.opencode/mimo-v2.6-flash-free: clicked Teal in the question card, receivedRECEIVED_COLOR=Teal; follow-up Square returnedRECEIVED_SHAPE=Square.RECEIVED_COLOR=Amber. Duplicate response rejected with HTTP 409; cancelling a recovery question recordsinterrupted/user, and a subsequent question works.$schemafield before the normalized hash baseline. No personal OpenCode config was changed.Fixes #4530