block / block/buzz

Persona mentions from a second desktop fail to send and mint orphan agent keypairs

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

Description

## Describe the bug

Managed-agent persona records sync across desktops signed into the same identity, but harness definitions and the agent runtime are per-machine. On a desktop that is not the agent's host machine, @-mentioning an agent resolves to the persona, and the send flow tries to instantiate a local agent from it (`createMentionedPersonaAgents` with `ensureRunning: true`). This fails with:

```
Could not create agent mentions: : cannot spawn agent : harness "" was deleted — pick a new harness for this agent or restore the harness definition
```

and the message send is blocked entirely. Each failed attempt also generates a fresh agent keypair, so repeated tries mint orphan identities.

The root cause is that mention resolution only consults the local managed-agent registry when deciding whether a persona is already instantiated (`useMentions.ts`: `personaCandidates` filters by local `managedAgentPersonaIds`; the send flow never checks relay agents). An agent that is alive on another desktop looks like an uninstantiated persona.

## To reproduce

1. Desktop A: create a managed agent from a persona with a custom harness. Agent runs, responds normally.
2. Desktop B (same identity, e.g. a second computer): join the same self-hosted relay.
3. Desktop B: in a channel, @-mention the agent by name and send.
4. Send fails with the harness error above; relay users table gains a new orphan pubkey per attempt.

DMs to the running agent from Desktop B work fine — only channel mentions break, because only they route through persona instantiation.

## Expected behavior

Mentioning an agent that is already live on the relay should tag that agent, regardless of which machine hosts it. Persona instantiation should only trigger when no live instance exists.

## Environment

- Desktop A: macOS, dev build from main
- Desktop B: Windows, v0.5.4 release
- Self-hosted relay

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.