buzz icon indicating copy to clipboard operation
buzz copied to clipboard

buzz-acp: custom agent commands (container launchers) get no BUZZ_* env — agent can receive prompts and reply only inside its own session, silently unreachable

Open chipchipss opened this issue 1 month ago • 0 comments

Summary

When BUZZ_ACP_AGENT_COMMAND points at a launcher that runs the ACP adapter inside a container (Docker), the adapter process never receives the relay credentials. buzz-acp holds BUZZ_RELAY_URL/BUZZ_PRIVATE_KEY in its own environment, but nothing forwards them to the spawned agent command. The agent boots fine, receives channel mentions, runs tools, produces a correct reply — and every reply is silently lost, because the only way for it to publish (the buzz CLI + env vars) is absent from its environment.

Reproduction

  1. Configure a managed agent whose BUZZ_ACP_AGENT_COMMAND launches docker run ... pi-acp (any ACP adapter inside a container; same applies to any sandboxed harness).
  2. @mention the agent in a channel.
  3. buzz-acp logs show the full healthy sequence: agent initialized, connected to relay, subscribed to channel, control signal sent to in-flight task.
  4. Container-side: the adapter receives the prompt, the model decides to run buzz messages send ... — which fails with command not found / empty BUZZ_* env.
  5. The user sees: agent online, typing indicator, no reply, journal "active but silent". Repeatable 100%.

Observed with a Docker-sandboxed pi agent (pi-acp 0.0.34) on buzz-acp with --permission-mode bypassPermissions; the failure shape is launcher-agnostic.

Expected

buzz-acp should forward at least BUZZ_RELAY_URL, BUZZ_PRIVATE_KEY, BUZZ_AUTH_TAG (and BUZZ_ACP_AGENT_OWNER) into the agent command's environment — or expose documented variables the launcher can use to inject them itself. Sandboxed launchers that construct a container command line currently have no supported way to pass the agent's relay identity through.

Workaround

Have the launcher script read the credentials out-of-band and inject them into the container:

exec docker run --rm -i --network host \
  -e BUZZ_RELAY_URL=wss://... \
  -e BUZZ_PRIVATE_KEY="$(grep -oP 'BUZZ_PRIVATE_KEY=\K.*' /opt/buzz-acp-launchers/agent.env)" \
  -v /opt/buzz/target/release/buzz:/usr/local/bin/buzz:ro \
  ...

This works, but the credential path duplication is fragile and the failure mode (silent no-reply with a fully healthy journal) is expensive to diagnose — it took forensic reconstruction of the JSONRPC stream from the container logs to find the agent had been correctly answering all along.

Suggestion

  • Pass through BUZZ_* relay identity env vars to the spawned agent process by default, or
  • Support an explicit BUZZ_ACP_PASSTHROUGH_ENV=BUZZ_RELAY_URL,BUZZ_PRIVATE_KEY,... option buzz-acp applies to the agent command, and
  • Optionally log a one-line warning when the agent command completes turns without any observed publish attempt from a buzz-less environment (would have turned hours of forensics into a 1-minute diagnosis).

Environment: buzz-acp 0.5.x, self-hosted relay, Linux host, Docker sandbox launcher.

chipchipss avatar Oct 19 '26 13:10 chipchipss