Archiving a Desktop-managed agent permanently deletes its local runtime config - unarchive does not restore the agent
Environment: Buzz Desktop 0.5.17, macOS 26.5.2, hosted relay (*.communities.buzz.xyz)
Steps:
- Create a Desktop-managed agent (local backend, buzz-acp).
- Archive it (NIP-IA
kind:9035, owner-signed). - Unarchive it - via the profile's "Unarchive agent" action or CLI (
kind:9036).
Observed: The relay's kind:13535 snapshot updates correctly both ways. But on archive, the agent's definition is removed from the Desktop's local managed-agents.json, and nothing in the app's retention store keeps a copy. After unarchive, the identity is live on the relay again but the Agents page card never returns - even after a full app restart. The agent's runtime config and key binding are unrecoverable; the only path forward is recreating the agent under a new identity, orphaning the old pubkey's history.
Expected: Archive should be reversible, in the spirit of NIP-IA's anti-shadowban design - either keep the local definition flagged as archived, or rebuild it on unarchive.
Secondary UX issue: an archived agent's profile (where the only "Unarchive agent" control lives) is unreachable unless the agent happens to be a member of some channel, since archived identities are hidden from search, the roster, and autocomplete. If the agent is in no channel, the owner has no UI path to unarchive at all - we had to add it to a channel via the CLI just to reach the button.
Buzz Desktop desktop-v0.5.23 (latest desktop tag in the repo; installed 2026-09-05), buzz CLI buzz.exe dated 2026-09-05 (no version string; buzz --version is not a valid argument) Relay: a Buzz-hosted community relay (*.communities.buzz.xyz), not self-hosted OS: Windows 11 Pro 10.0.26200, Hyper-V VM; agents run via buzz-acp with the Claude runtime
Additional observation on desktop-v0.5.23 (Windows 11, Hyper-V VM): archiving marks the agent on the relay but does not stop the local process and does not touch the local record.
2026-09-21 06:24:38 UTC: managed agent created via draft-create (owner clicked Save), buzz-acp process started (pid 6028), record in managed-agents.json with is_active true. 06:36 UTC: owner archives the agent in Desktop; Desktop then shows it as stopped, so the owner clicks Start. Result: a second buzz-acp process (pid 7488, started 06:36:16 UTC) for a NEW pubkey (c0489e21...), and a second record with the same display name. The first process (pid 6028) keeps running. By 07:05 UTC both are archived (first one before 06:43 UTC, second at 07:05 UTC). buzz agents archived (kind 13535) lists both pubkeys. Nevertheless: both buzz-acp processes still running, managed-agents.json unchanged (mtime 06:36:16 UTC, both records is_active true, last_stopped_at null), both pid files present, neither agent log has a "stopped" line. buzz-desktop.exe itself was not restarted at any point (pid 9728 since the day before). 07:05 UTC: we killed both processes by hand; re-checked 07:06:57 UTC: gone, no respawn, and Desktop did not notice (records still is_active true, pid files stale). Expected: archive stops the process, writes last_stopped_at, and a later Start resumes the same identity (or refuses because the agent is archived). Observed: archive = relay marker only; Start after archive = new key pair (cross-ref #5868); the old process lives on until killed by hand. Cross-check 08:19:58 UTC: killing the process of an active (non-archived) agent makes Desktop write last_stopped_at, last_exit_code 1 and last_error within 4 s. For the two archived agents it wrote nothing. So archiving ends Desktop's supervision of the process, not the process itself.
Follow-up on desktop-v0.5.23 (Windows 11 Pro 10.0.26200, Hyper-V VM, Claude runtime), one day after the comment above: archiving does not only fail to stop a running agent - Desktop starts archived identities again on the next app launch, and they answer inbound mentions like any active agent.
Measured today (2026-09-22) for two pubkeys that buzz agents archived (kind 13535) lists as archived since 2026-09-21:
managed-agents.jsonholds both deployment records withis_active: true,start_on_app_launch: true, and a freshlast_started_atof2026-09-22T08:59:11Z- the app launch of that morning. Archiving them the day before changed nothing in this file.- Searching the whole file for any field whose name contains "archiv" returns no match. The local record has no way to express "archived", so the relay marker and the local supervisor cannot agree by construction.
- Both processes are live right now (
buzz-acppid 13008 and 13948, pid files written 08:59:11Z, 13buzz-acpprocesses in total on the machine). - The archived identity does real work: its agent log contains 140
agent initializedlines, 40 of them today, the last at2026-09-22T13:52:17Z- roughly 24 s after an owner message in a group DM that carries the archived pubkey as aptag. So an archived agent is not merely running, it is being woken and it spends tokens. Expected: an identity that the relay reports as archived is neither started at app launch nor woken by inbound events; archiving writes the local record too (or the local record gains an archived field). Observed: archive is a relay-side marker only. The CLI cannot fix it either -buzz agentshas nostop/delete, so the only available remedy is killing the process by hand, which Desktop then undoes at the next launch. Related: #4450 (periodic reconcile starts agents withis_active: false) - same supervisor, different input; there the explicit local flag is ignored, here the relay state never reaches the local flag. #5754 covers the DM side (we cannot remove these identities from the group DM they were created in).