buzz icon indicating copy to clipboard operation
buzz copied to clipboard

ACP agent misses plain room messages when --channels is used without --subscribe

Open Mr-Godot opened this issue 3 months ago • 2 comments

Bug

The VECTOR Buzz ACP service did not receive ordinary messages sent in its room unless they explicitly mentioned @vector.

Evidence

  • Service command was buzz-acp ... --channels 7c5d7808-7d93-4124-9e3b-42a760132b40 with no --subscribe flag.
  • Startup log reported subscribe=Mentions.
  • ACP Mentions mode sets require_mention=true; relay filtering requires a p tag for the agent pubkey.
  • Room history contained ordinary user messages with no @vector mention and no corresponding agent response.

Impact

Agents configured only with --channels silently miss room messages, contradicting the expected room behavior.

Workaround applied locally

The VECTOR service is now configured with --subscribe all --channels ... and restarted successfully. The service reports subscribe=All and is connected.

Suggested fix

Clarify/adjust the default for --channels (or service templates) so a channel-scoped agent receives room messages by default, or make the mention-only behavior explicit and fail/warn loudly when no --subscribe mode is set. Add an integration test covering a plain top-level channel message without a mention.

Mr-Godot avatar Aug 04 '26 21:08 Mr-Godot

Revalidated against current main (3c7f288c60d67df78577b237e27c3dfc8831aaa1) before preparing any PR. The unresolved contract is still visible in current source:

  • --subscribe defaults to mentions independently of --channels;
  • Mentions mode requires the agent p tag in both relay subscription and local matching;
  • therefore a plain kind-9 message in an allowed channel is still dropped unless the operator explicitly uses --subscribe all.

Could a maintainer confirm which CLI contract is intended?

  1. Bare --channels <room> implies SubscribeMode::All for those rooms.
  2. It remains mention-only, but emits an actionable warning/error unless --subscribe is explicit.
  3. Channel-owned policy (the direction explored in #3552) owns the decision.

My preference is an actionable warning first, followed by requiring an explicit mode: it avoids both today's silent message loss and silently widening an existing deployment's traffic/cost. Service templates intended to process ordinary room traffic could then pass --subscribe all explicitly. Existing respond_to/author restrictions should remain unchanged whichever subscription contract is chosen.

Once that contract is explicit, I can adapt the preserved regression test and prepare the smallest non-overlapping patch.

maxitoon avatar Sep 07 '26 18:09 maxitoon

Combined follow-up for #4793 and #4794, rechecked at c213d90d5c450e2e579505da4a4145f528ecbcf2. Bare --channels still leaves subscribe=mentions; successful ACP completion returns the agent to the pool without a harness-owned room-result guarantee. I found no maintainer decision in either issue's discussion.

Could a maintainer choose the intended semantics before I turn the regression proposal into a patch?

  1. Ingress: (A) retain mention-only and document explicit --subscribe all; (B) retain it but warn/error when channel scope is supplied without an explicit mode; (C) make bare --channels imply all; or (D) let channel-owned policy decide (#3552).
  2. Publication: retain agent-owned buzz messages send, add an opt-in harness publisher (#4422), or use harness fallback with duplicate suppression (#5811; overlapping #5820)? Intentional silence should remain distinct from a missing requested result.
  3. Placement: for a top-level request, publish at the channel root or reply under the triggering event? For an existing thread, retain its root? #3908/#3687 already cover the channel-root alternative.

The verified RED test is preserved and ready to adapt: on 93114c9, the proposed bare-channels→All assertion failed with Mentions vs All (one test executed). This is prior executable evidence, not a fresh test run on today's SHA. Current source still has that default. I have not changed production behaviour; author restrictions must remain intact, and #5300/#6646 already address the separate all-mode event-kind scope. Once the contract is chosen, I can target only the remaining nonduplicate test/implementation gap.

maxitoon avatar Sep 22 '26 20:09 maxitoon