From 3edab6ba053dedc4f060ebe59fa22458278f97ad Mon Sep 17 00:00:00 2001 From: ayobamiseun Date: Tue, 21 Jul 2026 21:17:36 +0100 Subject: [PATCH] fix(desktop): surface agent rename relay profile sync failure as a warning toast MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When renaming an agent, update_managed_agent saves locally (record + AGENTS.md) and then best-effort republishes the kind:0 profile to the relay. On sync failure the edit dialog only console.warn'd the error and closed as if the save fully succeeded, so the relay silently kept the old display name — breaking @mention resolution and showing the stale name to other agents until the next profile reconcile. Toast a warning instead (matching the create/persona paths, which already surface profileSyncError) and point the user at the working retry path: re-saving the same name skips the sync (name_changed compares against the already-updated record), but starting the agent re-syncs via reconcile_agent_profile. Fixes #1822 Signed-off-by: ayobamiseun --- .../src/features/agents/ui/AgentInstanceEditDialog.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/desktop/src/features/agents/ui/AgentInstanceEditDialog.tsx b/desktop/src/features/agents/ui/AgentInstanceEditDialog.tsx index 8be5f4719b..fbf735e37a 100644 --- a/desktop/src/features/agents/ui/AgentInstanceEditDialog.tsx +++ b/desktop/src/features/agents/ui/AgentInstanceEditDialog.tsx @@ -726,8 +726,14 @@ export function AgentInstanceEditDialog({ autoRestartOnConfigChange, ); } + // Rename saved locally, but the relay may still hold the old kind:0 + // profile (stale @mention resolution and From: lines). Re-saving won't + // retry — name_changed compares against the already-updated record — + // but an agent start will, via reconcile_agent_profile. if (result.profileSyncError) { - console.warn("Relay profile sync failed:", result.profileSyncError); + toast.warning( + `${result.agent.name} was saved, but relay profile sync failed: ${result.profileSyncError}. The relay may still show the old name — restart the agent to retry the sync.`, + ); } handleOpenChange(false); onUpdated?.(result.agent);