buzz icon indicating copy to clipboard operation
buzz copied to clipboard

Managed relay (*.communities.buzz.xyz) on relay v0.2.0 breaks agent (buzz-acp) channel discovery — POST /query returns 404 with desktop v0.5.3

Open konsiembo opened this issue 3 months ago • 1 comments

Summary

The AI agent runtime (buzz-acp / buzz-agent) started from Buzz Desktop v0.5.3 fails to start against a managed community relay (*.communities.buzz.xyz). The agent connects and authenticates successfully, then fails during channel discovery:

Error: channel discovery error: HTTP error: POST /query returned HTTP 404 Not Found

The relay reports "version":"0.2.0" in its NIP-11 document, while the desktop client is 0.5.3. It looks like the managed relay is running a build that predates the HTTP /query channel-discovery endpoint the current agent expects, so the agent harness exits with status code 1.

Environment

  • Desktop app: Buzz Desktop v0.5.3 (Windows x64, installer Buzz_0.5.3_x64-setup_alpha-unsigned.exe)
  • OS: Windows 11 Pro
  • Agent runtime: buzz-agent v0.1.0 via buzz-acp, model=claude-opus-5, permission_mode=bypassPermissions
  • Relay: managed, wss://<community>.communities.buzz.xyz (fronted by Cloudflare)
  • Relay NIP-11: software: https://github.com/block/buzz, version: 0.2.0, auth_required: true, restricted_writes: true

Steps to reproduce

  1. Create a community via the app → it is provisioned on a managed *.communities.buzz.xyz relay.
  2. Install Buzz Desktop v0.5.3 on Windows and complete profile setup.
  3. Start/enable an agent (e.g. "Bumble") in the workspace.
  4. Agent harness exits with status code 1.

Log excerpt (buzz-acp)

INFO buzz_acp: buzz-acp starting: relay=wss://<community>.communities.buzz.xyz agent_cmd=...\buzz-agent.exe mcp_cmd=...\buzz-dev-mcp.exe model=claude-opus-5 permission_mode=bypassPermissions ...
INFO buzz_acp: agent_pool_ready agents=10
INFO buzz_acp: connected to relay at wss://<community>.communities.buzz.xyz
INFO buzz_acp: subscribed to membership notifications
INFO buzz_acp: owner resolved from BUZZ_AUTH_TAG: <owner-pubkey>
INFO buzz_acp: agent owner: <owner-pubkey>
INFO buzz_acp: relay observer enabled
Error: channel discovery error: HTTP error: POST /query returned HTTP 404 Not Found

Additional observation

An unauthenticated POST /query against the relay returns 401 Unauthorized (endpoint is auth-gated), while the agent's authenticated discovery call returns 404 Not Found — consistent with the specific route/query shape used by the 0.5.3 agent not being implemented in the 0.2.0 relay build.

Expected

Managed relays under *.communities.buzz.xyz should be on a build compatible with the current desktop/agent release, so agent channel discovery succeeds.

Questions

  • Are managed *.communities.buzz.xyz relays scheduled to be upgraded to match desktop v0.5.3?
  • Is there a supported way for a community admin to trigger a relay upgrade, or a minimum relay version required for the agent runtime?

konsiembo avatar Aug 03 '26 17:08 konsiembo

Seeing this on macOS as well, with the same 0.2.0 relay / 0.5.3 desktop skew — but the managed relay returns HTTP 500 rather than 404, and it is nondeterministic. Same failure point in the sequence (immediately after relay observer enabled).

Environment

  • Desktop app: Buzz Desktop v0.5.3 (macOS arm64)
  • OS: macOS 26.5.2 (build 25F84), Apple Silicon
  • Agent runtime: buzz-acp from the app bundle, driving claude-agent-acp v0.64.0, codex-acp v1.1.7, and goose across 6 agents
  • Relay: managed, wss://<community>.communities.buzz.xyz (Cloudflare-fronted)
  • Relay NIP-11: software: https://github.com/block/buzz, version: 0.2.0, auth_required: true, restricted_writes: true
Error: channel discovery error: HTTP error: POST /query returned HTTP 500 Internal Server Error

The part that may be useful: the same agent identity both succeeds and fails, minutes apart

This is not a stable 404 — discovery for one identity flips outcome between consecutive starts, with no config change in between. Two agents from the same fleet, same relay, same owner attestation:

Luna
  17:17:48.973  === starting Luna ===
                channel discovery error: POST /query returned HTTP 500
  17:18:01.211  === starting Luna ===
  17:18:39.649  discovered 3 channel(s)          <-- same identity, ~50s later
  17:18:58.811  === starting Luna ===
  17:19:03.924  discovered 3 channel(s)

Terra
  17:14:11.487  === starting Terra ===
  17:14:17.543  discovered 4 channel(s)
  17:17:48.973  === starting Terra ===
  17:17:57.127  discovered 4 channel(s)
  17:19:05.898  === starting Terra ===
                channel discovery error: POST /query returned HTTP 500   <-- same identity, ~68s later

During the 17:19 fleet start, 6 agents issued the same discovery call inside a ~3 second window: 5 got discovered N channel(s), 1 got the 500. Which agent loses is different each time.

Probing POST /query directly with the buzz CLI, I could not reproduce a steady failure rate either: 60+ consecutive successes as the owner identity, and one burst where a single agent identity failed 4/8, then 20/20 clean on resample ~10 minutes later. So the failures arrive in bursts affecting whoever calls during the window, not per-identity and not per-channel-roster.

Speculation, offered only because it fits the timing: if managed relays sit behind Cloudflare with more than one origin instance and a rolling upgrade is in flight, requests landing on a 0.2.0 instance would fail the /query shape the 0.5.3 agent sends while requests hitting an upgraded instance succeed. That would explain both the intermittency and why the failure is a 500 here and a hard 404 in the original report. I can't confirm it from outside — the addresses I can see are Cloudflare anycast, not origins.

Secondary: a transient 500 permanently kills the agent

Independent of the relay fix, the harness's retry classification turns a momentary blip into a dead agent. 503 is treated as retriable:

WARN buzz_acp::relay: POST /query returned retriable HTTP 503 Service Unavailable

...and is retried successfully. A 500 on the same endpoint is fatal — the harness exits with status 1. The buzz CLI classifies it the same way, reporting {"error":"relay_error","message":"relay error 500: internal server error","retryable":false}.

Two consequences worth noting:

  1. Nothing restarts the agent. The desktop app does not respawn a buzz-acp process that exits — it leaves a stale entry in agents/agent-pids/ pointing at the dead pid, so the UI and reality diverge until the user manually restarts.
  2. Because discovery succeeds on retry within a minute, retrying 500 the way 503 is already retried would have masked this outage entirely for agent startup.

Would it make sense to treat 5xx uniformly as retriable on the discovery path, given it runs once at startup and a single failure costs the whole agent?

Workaround for anyone else hitting this

Restarting the agent repeatedly does eventually succeed — the call is not deterministically broken against managed 0.2.0 relays. In this fleet 5 of 6 agents came up on the same attempt that killed the 6th.

geniusblack9999 avatar Aug 03 '26 17:08 geniusblack9999