Desktop resolves typed @Name against all known profiles, not channel members — a removed duplicate identity still gets p-tagged, so remove-member cannot repair a mention collision
Environment
- Buzz Desktop v0.5.14, macOS (Darwin 25.4)
- Hosted relay
wss://buzz.ngnc.net - Same owner identity signed in on two Macs (which is how the duplicate agent identities arose — see #2648 / #6211; this issue is about the repair path, not the minting)
Summary
When several agent profiles share a display name, Buzz Desktop resolves a typed @Name in a channel composer against every profile it knows about, not against the channel's current member list. So a duplicate identity that has been removed from the channel with buzz channels remove-member is still the one that gets p-tagged. The natural fix operators reach for (remove the ghost from the channel) therefore does nothing to mentions; the only working remedy today is renaming the ghost's display name.
The CLI behaves differently and, I think, correctly: buzz messages send resolves @Name against channel members and refuses to send on an ambiguous or non-member match.
Steps to reproduce
- End up with two agent identities sharing display name
Moneypenny(in our case one live keybebbcf8d…and one dead key5e03b576…minted by a second Desktop whose runtime binary was missing — see #6211). - Confirm both are members of channel X. Remove the dead one:
buzz channels remove-member --channel <X> --pubkey 5e03b576…→ succeeds;buzz channels membersshows only the live key. - From Desktop, in channel X, type
@Moneypenny hiand send. - Inspect the event: the
ptag is5e03b576…— the key that is no longer a member. The live agent is never woken.
Expected
Desktop resolves a typed mention against the channel's members (as the CLI does), and a non-member is never p-tagged. If a name is still ambiguous within the members, surface that rather than picking silently.
Actual
The removed identity is p-tagged. Removal from the channel does not change what the composer picks; only renaming the ghost's profile does.
Why it matters
Every duplicate-identity report (#2648, #5583, #6211, #5542) ends with the operator trying to clean up. Removing the ghost from channels is the obvious cleanup and it looks like it worked (roster is correct) while mentions keep going to the corpse. That silent mismatch cost us most of a day of debugging.
Related
#2648, #6211, #5583, #5542, #5264, RFC #5667
Same-machine reinstall, not a second Mac.
Observed 2026-08-20 on Buzz Nest / Desktop: the owner installed and deleted Nest several times on one Mac, leaving abandoned agent nsecs. The Agents tab does not show three of each default agent. Typing @ still offers multiple Fizz / Honey / etc., including agents already deleted in that UI.
That matches the repair-path failure here: Desktop @ is not limited to the current channel members or the Agents tab. Scoping the picker to the current relay’s managed-agents.json rows (#5720) would not hide these if the local Agents list is already clean — leftover kind:0 / known profiles still resolve.
No new issue. The ask is the same as this one: resolve @Name against current channel members (as the CLI already does), not against every known profile.
Variant: a human identity that was never a community member
Adding a data point that breaks the cleanup paths proposed so far. Every report above involves agents that were at some point members (or had local managed-agents.json rows). Here the duplicate is a person, and the ghost key is not a member of the community at all — so there is nothing to remove.
Environment
- Buzz Desktop 0.5.19, macOS (Darwin 25.5)
- Block-hosted community, NIP-43 membership enforced
What happened
- A teammate joined the community on mobile, which published a kind:0 profile under key A.
- Phone → desktop identity recovery failed for unrelated reasons, so he created a fresh desktop identity (key B) and joined with a new invite.
- Settings → Invites (the relay membership roster) correctly shows exactly one member for him: key B. Key A is not listed and has no access.
- Typing
@Kerin a channel composer offers two entries with the same display name: key B, and key A labeled "not in channel".
Why the existing repair paths don't apply
channels remove-member— nothing to remove; key A was never a channel member.- Removing from the community — key A is not in the membership roster either.
- Scoping the picker to
managed-agents.json(#5720) — not an agent.
The only remedy suggested in this thread that would work is asking the teammate to rename his old profile, which requires him to still control and re-open an identity he has abandoned.
Where it comes from
buildMentionCandidates.ts merges the channel roster, agent directories, standalone personas, and global people search. That last source is gated by canSearchGlobalUsers, which in useMentions.ts is just mentionSearchQuery.length > 0 — so as soon as you type one character after @, every kind:0 profile the relay has ever indexed becomes a candidate, membership irrelevant.
Credit where due: mentionRanking.ts does sort isMember candidates first, so in the picker this is visual noise rather than mis-selection. But it is the same "resolve against all known profiles" surface this issue is about, and it feeds the typed-resolution path in the original report.
Suggested narrow fix
When a global-search candidate is a non-member whose display name collides with a candidate that is a member, drop the non-member rather than listing both. That preserves the useful case (mentioning a community member who isn't in this channel yet) while removing the duplicate-person case entirely.
Alternatively, expose the NIP-IA admin consent path in the UI. Archival already hides deleted agent identities from member lists and mention suggestions; there is no equivalent owner-facing action for a stale human identity.