block / block/buzz

[Bug] Existing channel agents cannot be associated with a team; deploy clones identities and stale profiles pollute mentions

Open
#6,232 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
32.7k
Forks
4.3k
Avg merge
1d 13h
Merged PRs (30d)
253

Description

## Summary

Buzz Desktop does not allow an existing set of managed agents already present in a channel to be associated with an existing Agent Team.

The only available action is **Deploy to channel**, whose dialog says it will “Create and attach one agent per member” and offers **Deploy 5 agents**. Using that path would clone the five agents and create new Nostr identities.

Separately, the mention picker indexes superseded same-name profile identities that are no longer shown on the Agents page. These stale identities appear as “agent managed by you · not in channel,” producing duplicate search results.

## Environment

- Buzz Desktop: **v0.5.14**
- Platform: macOS
- Bundle ID: `xyz.block.buzz.app`
- Hosted relay: `wss://paigeashley.communities.buzz.xyz`

## Reproduction: team association

1. Create or retain five managed agents: Ace, Karoo, Luffy, Sanji, and Zoro.
2. Add those five active identities individually to an open channel.
3. Create an Agent Team named **E-com Team** containing those same five managed agents.
4. Open the channel mention picker.
5. Observe that **E-com Team** is absent, although all five team members are present in the channel.
6. Go to **Agents → E-com Team → Deploy to channel**.
7. Select the same channel.
8. Observe the text: “Create and attach one agent per member of E-com Team to the selected channel” and the final action **Deploy 5 agents**.

## Actual behavior

- A team mention is unavailable unless the team is deployed.
- Deployment creates new agent identities instead of associating the existing managed identities already in the channel.
- The safe configuration path therefore cannot produce a group mention.

## Expected behavior

Either:

1. Support **Associate existing agents with team** without creating identities; or
2. Resolve a team mention dynamically when every team member’s current managed identity is already a member of the channel.

In this case the picker should show **E-com Team · 5 agents** and expand the mention to the existing Ace, Karoo, Luffy, Sanji, and Zoro identities.

## Reproduction: stale duplicate profiles

1. Have superseded agent identities with the same display names as current managed agents.
2. Confirm the Agents page shows only the current managed records.
3. Confirm the trusted archive snapshot is empty.
4. Open a channel mention picker.
5. Observe two entries for each affected display name:
- Current identity, present in channel.
- Superseded identity, labeled **not in channel**.

Affected names in the observed account: Ace, Karoo, Luffy, Sanji, and Zoro.

## Expected stale-profile behavior

The mention picker should prioritize the owner’s current managed-agent records and exclude superseded identities, unless the user explicitly searches by `npub` or requests archived/historical identities.

## Safety impact

- Users may notify or add the wrong same-name identity.
- Attempting to make a team mentionable encourages deployment that creates another duplicate set.
- Duplicate identities fragment channel memberships, sessions, memory, and message history.

## Acceptance criteria

- An existing Agent Team becomes mentionable when its current managed members already belong to the channel.
- No new agent identity is created during association.
- Team mention expansion signs `p` tags for the existing channel-member pubkeys.
- Superseded same-name profiles do not appear in ordinary mention results.
- Existing deployed-team behavior remains supported for users who intentionally want fresh agent instances.

Contributor guide

Open the contributing guide

Research direction

Start by tracing the Agents → team → Deploy to channel flow and the channel mention picker, then compare current managed-agent records with channel-member pubkeys. Done means existing teams become mentionable without creating identities, mentions expand to existing members, and superseded same-name profiles are excluded from ordinary results while intentional fresh deployments still work.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
desktop
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.