Buzz Desktop 0.5.2: agent_args reset to [] and missing_binary setup payload error prevents OpenCode ACP integration
- Dominant language
- Rust
- Stars
- 32.7k
- Forks
- 4.3k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 253
Description
## Summary
Buzz Desktop v0.5.2 has two bugs that prevent OpenCode (and other ACP-based agents) from working properly as agents.
## Bug 1: `agent_args` silently reset to `[]` by Buzz Desktop
**Observed behavior:**
When configuring an agent to use OpenCode via the Buzz Desktop UI, the `agent_args` field in `managed-agents.json` keeps getting silently reset to `[]` (empty array) after being set to `["acp"]`.
**Impact:**
OpenCode requires the `acp` subcommand to start in ACP server mode (e.g., `opencode acp`). Without it, Buzz Desktop launches `opencode` with no arguments, which starts in interactive mode instead of ACP mode. `buzz-acp` waits 60s and times out with:
```
agent initialize failed: Request timeout — agent did not respond within 60s
```
**Root cause:**
Buzz Desktop's internal state management overrides the `agent_args` value in `managed-agents.json` on every restart/sync, discarding any user-set value.
**Expected behavior:**
When a user explicitly sets `agent_args` through the UI or directly in the config file, Buzz Desktop should preserve that value.
**Workaround discovered:**
Replace the `opencode` binary with a wrapper script that detects `buzz-acp` as its parent process and auto-injects the `acp` argument:
```bash
#!/bin/bash
if [ \$# -eq 0 ] || { [ \$# -eq 1 ] && [ -z "\$1" ]; }; then
PARENT_NAME=\$(ps -p \$PPID -o comm= 2>/dev/null)
case "\$PARENT_NAME" in
*buzz*)
exec /path/to/opencode-real acp
;;
esac
fi
exec /path/to/opencode-real "\$@"
```
## Bug 2: `missing_binary` unknown variant in setup payload
**Observed behavior:**
When `provider` and/or `provider_binary_path` are set in the agent config, `buzz-acp` crashes with:
```
Error: setup payload error: malformed BUZZ_ACP_SETUP_PAYLOAD: unknown variant `missing_binary`, expected one of `normalized_field`, `env_key`, `cli_login`, `cli_config_invalid`, `git_bash`
```
**Root cause:**
The setup payload format sent by Buzz Desktop or the relay contains a `missing_binary` variant that the `buzz-acp` binary (v0.5.2) does not recognize. This suggests a version mismatch — `buzz-acp`'s setup payload parser does not include `missing_binary` in its valid variants enum.
## Environment
- **Buzz Desktop version:** 0.5.2 (bundle xyz.block.buzz.app)
- **OS:** macOS (arm64)
- **Agent runtime:** OpenCode 1.18.9-fork
- **Relay:** WebSocket relay (tested with `wss://kamil22.communities.buzz.xyz`)
## Steps to Reproduce (Bug 1)
1. Install Buzz Desktop 0.5.2 and OpenCode CLI
2. Create a team with agents (e.g., Fizz, Bumble, Honey personas)
3. Configure an agent to use OpenCode runtime via UI
4. Edit `managed-agents.json` to set `agent_args: ["acp"]`
5. Restart Buzz Desktop or toggle the agent
6. Observe that `agent_args` reverts to `[]`
## Steps to Reproduce (Bug 2)
1. In `managed-agents.json`, set `provider` and/or `provider_binary_path` on an agent
2. Toggle the agent on
3. Observe the `missing_binary` error in agent logs
## Suggested Fixes
1. **For Bug 1:** Ensure Buzz Desktop preserves `agent_args` when syncing agent configuration. The args array should only be modified through intentional user action.
2. **For Bug 2:** Add `missing_binary` to the valid variants enum in `buzz-acp`'s setup payload parser, or ensure the relay does not emit this variant to older clients.
Contributor guide
Assessment
This issue has not been assessed yet.