[Bug] buzz-cli silently drops unresolved @mentions (exit 0, no warning on stderr)
Describe the bug
buzz messages send drops @name mentions that do not resolve, without saying so. The message posts, the CLI exits 0, and nothing goes to stderr. From the caller's side, a mention that notified someone and a mention that notified nobody look identical.
Resolution is scoped to the target channel. resolve_content_mentions (crates/buzz-cli/src/commands/messages.rs:128) builds its name map from that channel's kind 39002 member list, then fetches kind 0 profiles for those pubkeys only. A name that resolves community-wide will not resolve in a channel the named account has not joined.
I am not arguing the scoping is wrong. The problem is that a failure to resolve produces no signal. Both early returns hand back an empty vec, and the caller cannot tell "no @ in the content" apart from "@ present, nothing matched."
Evidence
One message, one channel, one sender. @Larry Velez was a member of that channel. @shadow-buzz was not.
content: 'isolation test: @Larry Velez is a member here, @shadow-buzz is not'
tags: ['h', '520d016d-...']
['p', '35db738d...'] <- Larry, resolved
<- shadow-buzz: no tag, no warning
exit code: 0
To Reproduce
- Create a channel that the target account has not joined
buzz messages send --channel <uuid> --content '@Target hello'- The event carries zero
ptags, the CLI exits 0, stderr is empty
Expected behavior
Warn on stderr when the content contains an @ token that did not resolve, naming the token: warning: '@Target' matched no member of this channel, no mention tag added.
A --strict-mentions flag that exits nonzero would help scripted and agent callers, who cannot eyeball a warning.
Why it matters
Agents post through this command and nothing else. An agent-to-agent handoff into a channel the recipient has not joined fails with no signal on either side: the sender sees success, the recipient never hears about it.
Self-mentions also resolve to nothing silently. That is probably intended, but it is the same silence.
Related
Supersedes #3006, which I filed with an incorrect root cause and have withdrawn.
Same silent-failure family as #2526, #2686, #2909 and #2835, which cover markdown emphasis, the workflow parser, prefix collisions and mobile DMs.
Version: relay and CLI built from source 2026-07-26, self-hosted single-community relay.
I'd like to work on this.
Plan:
- When content contains
@tokens that do not resolve against the channel member list, emit a warning on stderr naming each unresolved token. - Add
--strict-mentionsso scripted/agent callers can exit nonzero on unresolved mentions. - Keep channel-scoped resolution as-is (not a bug).
Will open a PR against block/buzz after the fix is reviewed on my fork.
Opened PR: https://github.com/block/buzz/pull/3047 (pre-reviewed on https://github.com/tynamite/buzz/pull/1 — Codex clean + local pass-2 approve).
Retested on Buzz Desktop 0.5.28 (macOS) with the bundled buzz CLI. Fixed.
buzz messages send now refuses to post when an @name does not resolve to a current channel member. It exits 1 and names the token:
$ buzz messages send --channel <dm> --content "@Fizz hello" # Fizz exists, not a member here
{"error":"user_error","message":"mention '@fizz' does not match a current channel member; retry with --mention <pubkey>","retryable":false}
exit=1
$ buzz messages send --channel <dm> --content "@NoSuchMember3015 hello"
{"error":"user_error","message":"mention '@nosuchmember3015' does not match a current channel member; retry with --mention <pubkey>","retryable":false}
exit=1
Neither message was posted. That is stricter than the warning I asked for, and it is what agent callers need. Passing --mention <pubkey> explicitly allows the unresolved name as text only.
This looks like it came in with #3330 (feat(cli): mirror Desktop mention delivery, merged 2026-07-29). Closing.