Skip to content

fix(desktop): mention live relay agents instead of re-instantiating personas - #4635

Closed
dilate7 wants to merge 1 commit into
block:mainfrom
dilate7:fix/mention-live-relay-agents
Closed

fix(desktop): mention live relay agents instead of re-instantiating personas#4635
dilate7 wants to merge 1 commit into
block:mainfrom
dilate7:fix/mention-live-relay-agents

Conversation

@dilate7

@dilate7 dilate7 commented Aug 3, 2026

Copy link
Copy Markdown

Summary

Persona mentions sent from a desktop that is not the agent's host machine try to spawn a local instance and fail (harness definitions are per-machine), blocking the send and minting a fresh orphan keypair per attempt.

This change makes createMentionedPersonaAgents resolve a persona mention to an already-live relay agent with the same display name when one exists, preferring an agent that is already a member of the current channel. Instantiation from the persona still happens when no live agent exists, so the summon-into-channel flow is unchanged on the host machine.

Not included: hiding persona autocomplete candidates that duplicate a live relay agent. That would touch useMentions.ts, which sits at the file-size ratchet cap — happy to do it as a follow-up with the extraction that requires, if wanted.

Related issue

Fixes #4634

Testing

  • pnpm -C desktop typecheck, biome check, and the mention test suites (useMentions.test.mjs, mentionCandidates.test.mjs) pass.
  • The failure was reproduced on the two-desktop setup described in the issue (macOS dev-build host + Windows v0.5.4 client on a self-hosted relay): channel mentions from the non-host desktop fail with the harness error while DMs work.
  • End-to-end verification of the fix on the non-host desktop is pending a patched Windows build (in progress); will report back on this PR.

…ersonas

When a persona mention is sent from a desktop that is not the agent's host
machine, the send flow tries to spawn a local instance and fails (harness
definitions are per-machine), blocking the send entirely. Each failed
attempt also mints a fresh agent keypair.

Resolve persona mentions to an already-live relay agent with the same name
when one exists, preferring an agent that is a member of the current
channel. Instantiation from a persona still happens when no live agent
exists.

Signed-off-by: dilate7 <dilate7@gmail.com>
@dilate7
dilate7 requested a review from a team as a code owner August 3, 2026 23:06
@dilate7

dilate7 commented Aug 3, 2026

Copy link
Copy Markdown
Author

Withdrawing this for now — verification on a second desktop surfaced an additional spawn path (managed-agent start on mention) that this change doesn't fully cover yet. I'll follow up once the fix is verified end-to-end. The issue (#4634) still stands and reproduces as described.

@dilate7 dilate7 closed this Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant