Skip to content

Guard OpenCode bell plugin in ACP mode - #60507

Merged
agu-z merged 1 commit into
zed-industries:mainfrom
white-hat:guard-opencode-bell-acp
Jul 11, 2026
Merged

Guard OpenCode bell plugin in ACP mode#60507
agu-z merged 1 commit into
zed-industries:mainfrom
white-hat:guard-opencode-bell-acp

Conversation

@white-hat

Copy link
Copy Markdown
Contributor

Summary

  • Add an ACP-mode guard to the documented OpenCode bell plugin snippet
  • Preserve terminal bell notifications for Terminal Threads while avoiding writes to stdout when OpenCode is used as an ACP External Agent

Rationale

The OpenCode bell plugin writes BEL to stdout for Terminal Thread notifications. When the plugin is installed globally and OpenCode runs in ACP mode, stdout is the JSON-RPC transport. OpenCode sets OPENCODE_CLIENT=acp in this mode, so the guard prevents BEL bytes from corrupting ACP JSON-RPC messages, including usage updates and permission flows.

Release Notes:

  • N/A

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Jul 7, 2026
@dinocosta dinocosta added the area:ai/opencode OpenCode integration label Jul 7, 2026
@bennetbo bennetbo added the area:ai Related to Agent Panel, Edit Prediction, Copilot, or other AI features label Jul 10, 2026
@agu-z agu-z self-assigned this Jul 11, 2026
@agu-z

agu-z commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Looks good to me! Thanks for improving this for other OpenCode users.

@agu-z
agu-z enabled auto-merge July 11, 2026 12:44
@agu-z
agu-z added this pull request to the merge queue Jul 11, 2026
Merged via the queue into zed-industries:main with commit bc99075 Jul 11, 2026
60 checks passed
@zed-zippy zed-zippy Bot added the PR state:needs review Used to label PRs that are in need of a post-merge approval label Jul 11, 2026
@bennetbo

Copy link
Copy Markdown
Member

@zed-industries/approved

@zed-zippy zed-zippy Bot removed the PR state:needs review Used to label PRs that are in need of a post-merge approval label Jul 13, 2026
jolutz pushed a commit to jolutz/zed that referenced this pull request Aug 8, 2026
## Summary

- Add an ACP-mode guard to the documented OpenCode bell plugin snippet
- Preserve terminal bell notifications for Terminal Threads while
avoiding writes to stdout when OpenCode is used as an ACP External Agent

## Rationale

The OpenCode bell plugin writes BEL to stdout for Terminal Thread
notifications. When the plugin is installed globally and OpenCode runs
in ACP mode, stdout is the JSON-RPC transport. OpenCode sets
`OPENCODE_CLIENT=acp` in this mode, so the guard prevents BEL bytes from
corrupting ACP JSON-RPC messages, including usage updates and permission
flows.

Release Notes:

- N/A
playdohface pushed a commit to playdohface/zed that referenced this pull request Aug 29, 2026
## Summary

- Add an ACP-mode guard to the documented OpenCode bell plugin snippet
- Preserve terminal bell notifications for Terminal Threads while
avoiding writes to stdout when OpenCode is used as an ACP External Agent

## Rationale

The OpenCode bell plugin writes BEL to stdout for Terminal Thread
notifications. When the plugin is installed globally and OpenCode runs
in ACP mode, stdout is the JSON-RPC transport. OpenCode sets
`OPENCODE_CLIENT=acp` in this mode, so the guard prevents BEL bytes from
corrupting ACP JSON-RPC messages, including usage updates and permission
flows.

Release Notes:

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

Labels

area:ai/opencode OpenCode integration area:ai Related to Agent Panel, Edit Prediction, Copilot, or other AI features cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants