Skip to content

Desktop @-mention autocomplete only shows locally managed agents #3809

Description

@CExKEze

Purpose

Teams need to @mention shared / org-level agents from their own Buzz Desktop — for example a research agent owned by someone else but configured with respond_to: allowlist or anyone and present in a shared channel.

Today that is impossible through the UI. Non-owners only see agents managed by their own Desktop install. respond_to settings cannot fix it.

Blocker

In Desktop mention autocomplete, agent candidates are filtered by isAgentIdentityInManagedList before the respond_to / shared-channel eligibility logic runs.

managedAgentPubkeys comes from listManagedAgents (local Tauri command for this install). Any channel member with role: "bot" whose pubkey is not in that local set is dropped.

So the allowlist / anyone eligibility code in relayAgentIsSharedWithUser / shouldHideAgentFromMentions is unreachable for cross-owner agents.

Actual vs expected

Actual @ list shows only agents this Desktop manages. Cross-owner channel bots never appear.
Expected Agents that are channel members and that the viewer is allowed to invoke (respond_to: anyone + shared channel, or respond_to: allowlist including the viewer) appear in @ autocomplete.

Repro

  1. User A owns agent X; agent X is a member of a shared channel; respond_to is allowlist (includes User B) or anyone.
  2. User B opens that channel on their own Desktop (does not manage agent X).
  3. User B types @ in the composer.

Result: Agent X is missing. User B only sees agents their install manages.

Note: Explicit CLI --mention <pubkey> still delivers (relay accepts it). This is a Desktop autocomplete UI gate, not a relay delivery failure.

Code

  • desktop/src/features/messages/lib/useMentions.ts (~244–262) — addCandidate order: managed-list filter before eligibility hide
  • desktop/src/features/agents/lib/agentAutocompleteEligibility.ts (isAgentIdentityInManagedList, relayAgentIsSharedWithUser)
  • desktop/src/features/agents/hooks.ts (useManagedAgentsQuery → local listManagedAgents)

Out of scope for this issue

Whether the harness author gate wakes the agent after a successful mention. That is a separate path. This issue is only: non-owners cannot select the agent in Desktop @ autocomplete.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions