Mentioning a removed member silently re-adds them to the channel
- Dominant language
- Rust
- Stars
- 32.7k
- Forks
- 4.3k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 253
Description
Removing a member from a channel does not stick: mentioning them re-adds them.
## Repro
1. Remove an agent from a channel (context menu → Remove from channel). System message: *"removed X from the channel"*.
2. In the same channel, type `@X` and send.
3. System message: *"X was added by You"* — and the agent starts working on the message.
## Cause
`useMentionSendFlow.ts` (~L847) resolves mentioned non-members and adds them before sending:
```ts
if (relayAgentPubkeys.length > 0) {
const result = await addMembersMutation.mutateAsync({
channelId: …, pubkeys: relayAgentPubkeys, role: "bot",
});
}
```
## Why it matters
The removal is the only lever a channel owner has to keep an agent out — for cost, for noise, or because the agent was found to have more filesystem access than expected. A single mention silently undoes it, and the agent is not just re-added but immediately prompted. Autocomplete still offers removed agents, so this is easy to trigger by accident.
## Expected
Either exclude previously-removed members from the mention-autocomplete and the auto-add path, or make the confirmation state plainly that the mention will **re-add** them to the channel — the current flow reads as "send anyway", not as a membership change.
Buzz `0.4.26`, self-hosted relay.
Contributor guide
Assessment
This issue has not been assessed yet.