[Bug] Desktop: editing an agent forks a duplicate identity-less record instead of updating the existing one
- Dominant language
- Rust
- Stars
- 32.7k
- Forks
- 4.3k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 253
Description
Environment: Buzz Desktop v0.5.3, macOS 15 (Darwin 25.1.0), community relay *.communities.buzz.xyz, agents on Claude Code harness via @agentclientprotocol/claude-agent-acp. The affected agents included ones originally created from demo/template agents and later renamed.
Summary: Editing existing agents through the Edit-agent dialog created a second record per agent in managed-agents.json: the new records carried the same display names but empty pubkey, empty relay_url, start_on_app_launch: false, last_started_at: null. After the next app restart, the original (identity-bearing) records stopped being started, the duplicates could not start (no identity), and all four agents went permanently silent — while the Agents UI looked normal. No error surfaced anywhere.
Steps to reproduce (as observed):
Have several working personal agents (some renamed from demo agents).
Edit each one via Edit-agent (in our case: changing respond-to) and Save.
Inspect managed-agents.json: each agent now appears twice — original entry with pubkey set, plus a new entry with "pubkey": "", "relay_url": "".
Restart the app: no agent runtimes start; agents stop responding to anyone, including the owner.
Expected: Edit updates the existing agent record in place; one record per agent; identity retained.
Actual: Fork into old + new records with the identity stranded on the record the app no longer treats as canonical. Recovery required restoring managed-agents.json from a manual backup with the app closed.
Extra data point: while the duplicates existed, deleting the identity-less copies by hand made things worse — on relaunch the app regenerated them as blank default agents ("Fizz/Honey/Bumble" template names) and flagged the identity-bearing records as "Unknown agents / configuration missing". So the identity-less records appear to be the app's intended new-format rows, but the migration leaves the identity behind and breaks startup.
Impact: total, silent loss of a working multi-agent setup after a routine settings edit; non-obvious recovery (file-level backup/restore).
Possibly related: #2717.
Contributor guide
Research direction
Start by reproducing the Edit-agent save flow and inspecting managed-agents.json before and after editing an agent, then trace the update or migration path that chooses the canonical record. Compare the identity-bearing and identity-less entries, and review related issue #2717. Done means editing preserves one record per agent, retains its identity and startup settings, and restores agent startup after relaunch without silent loss.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100