# Guard OpenCode bell plugin in ACP mode \(\#60507\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/bc990753733d6da5368e9e38ed360afc1704efc5)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: bc990753733d6da5368e9e38ed360afc1704efc5

Requested commit: bc990753733d6da5368e9e38ed360afc1704efc5

Commit: bc990753733d6da5368e9e38ed360afc1704efc5

Tree: 9a1dc056cb3a494b8caf5af4d948c85cdb4b1f91

Author: Eli Stark

Committer: GitHub

## Message

```
Guard OpenCode bell plugin in ACP mode (#60507)

## 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
```

## Parents

- [5f8a7413a31769e0882357f90dc424b3962ac72d](https://git.cafe/gitcafe/zed/commit/5f8a7413a31769e0882357f90dc424b3962ac72d?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/bc990753733d6da5368e9e38ed360afc1704efc5?format=markdown)
