Skip to content

fix(acp): normalize OpenCode command results - #2376

Merged
ymichael merged 1 commit into
mainfrom
bb/fix-opencode-command-results-thr_vmuyh6z99m
Aug 25, 2026
Merged

fix(acp): normalize OpenCode command results#2376
ymichael merged 1 commit into
mainfrom
bb/fix-opencode-command-results-thr_vmuyh6z99m

Conversation

@ymichael

Copy link
Copy Markdown
Collaborator

What was wrong

OpenCode carries command output and exit status in its vendor-specific rawOutput.output and rawOutput.metadata fields. The shared ACP command-result parser intentionally recognizes only standardized content and established generic result shapes, so completed OpenCode command rows could lose their output and exit code.

What changed

Added an OpenCode ACP dialect that validates the recorded result envelope and normalizes output, metadata.output, and metadata.exit only when interpreting an OpenCode command. Standard ACP content, Cursor-style streams, grok's result fields, and generic ACP behavior retain precedence. The built-in OpenCode provider now declares the dialect, and the custom-agent configuration guide and bb-cli skill list opencode as a supported dialect. There are no host-daemon wire-contract changes, so HOST_DAEMON_PROTOCOL_VERSION is unchanged.

How you verified

  • Added regression coverage for the recorded OpenCode envelope, metadata output fallback, standardized-content precedence, established result-shape precedence, and generic ACP isolation.
  • pnpm exec turbo run test --filter=@bb/provider-bridge-acp -- src/dialect.test.ts src/delta-translation.test.ts
  • pnpm exec turbo run typecheck --filter=@bb/provider-bridge-acp --filter=bb-plugin-provider-acp
  • pnpm exec turbo run test --filter=@bb/provider-bridge-acp --filter=bb-plugin-provider-acp

Fixes: N/A (no linked issue)

AGENT GENERATED

@ymichael
ymichael force-pushed the bb/fix-opencode-command-results-thr_vmuyh6z99m branch from 74f84d6 to 944db0b Compare August 25, 2026 03:44
@ymichael
ymichael merged commit fc43700 into main Aug 25, 2026
15 checks passed
@ymichael
ymichael deleted the bb/fix-opencode-command-results-thr_vmuyh6z99m branch August 25, 2026 03:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant