Provider-backed managed agents have no management surface on the owner's other desktops — sync agent records across devices
Motivation
Anyone who runs Buzz Desktop on more than one machine and uses a buzz-backend-* provider hits this. I self-host a relay and deploy agents to an always-on cloud VM through a custom provider plugin. The agents themselves are healthy from every device — they live on the VM and in relay channels. But the management of those agents is pinned to the single desktop that created them: managed-agent records (including backend/backend_agent_id/provider_config) live only in that machine's local app data, and agent_snapshot.rs deliberately excludes backend fields from what's published to the relay. On every other desktop I own there is no card, no deploy/shutdown, no model info — and if the originating machine's local record is lost, a healthy remote deployment is permanently orphaned (no undeploy in the v1 provider protocol, per the deferral note in commands/agents.rs). The durable-agent benefit of remote backends inverts: the agent outlives any laptop, but its controls don't.
Proposed solution
Owner-scoped sync of managed-agent records through the relay, so the same owner signed in on another desktop can see and manage their provider-backed agents:
- A NIP-44 owner-encrypted record event carrying the non-secret management fields (provider id,
backend_agent_id,provider_config, runtime/model), with key material either included under owner encryption or explicitly re-paired per device. - When a synced record references provider
Xandbuzz-backend-Xisn't installed locally, degrade gracefully: show the card read-only with a hint ("managed via provider X — installbuzz-backend-Xto manage from here") instead of showing nothing.
Alternatives considered
- Install the plugin on every machine: doesn't help — the records still don't sync, so other desktops can't see the agents to manage them.
- Designate one "admin" machine: workable discipline, but fragile (single point of failure for management) and surprising to users who expect account-level state.
- Manage out-of-band over SSH: what I do today; works, but bypasses the UI the feature exists to provide.
Additional context
- Related but distinct open issues about mention/discovery of agents on secondary devices: #2349 (closest), #3277, #4187. This issue is about the management/records layer for provider-backed agents rather than mentionability.
- Provider protocol reference points:
desktop/src-tauri/src/managed_agents/backend.rs(discovery,invoke_provider),agent_snapshot.rs(backend fields excluded from relay),commands/agents.rs(undeploy deferred to v2). - Happy to test any proposed record-sync approach against a real self-hosted deployment (Railway relay + DigitalOcean agent host + custom provider plugin).
Another data point from building a third-party provider, with a sharper reproduction of the management gap.
Shutdown is a silent no-op for a provider-backed agent.
Steps:
- Create an agent with
Run on: <a buzz-backend-* provider>, start-after-create on. It deploys;backend_agent_idis set. - Open its profile → Shutdown.
Observed: the click succeeds and the UI gives no error, but
- the remote harness process is still running (verified by resolving
cwdfor everybuzz-acppid), - the record still reads
is_active: true,last_stopped_at: null,last_error: null.
So there is no signal — visual or logged — that the operation did nothing. Same for Start: the record already says deployed, so it is also a no-op.
The third consequence, which cost the most time: the agent takes its persona hostage. Deleting the persona fails with
persona <id> has provider-deployed agent instances (<name>); delete those agent instances first
which is correct behaviour given the pre-flight guard in commands/personas/mod.rs, but combined with the above it means a provider-backed agent can only ever be removed via delete-with-force_remote_delete, and that knowingly orphans the substrate object.
What the orphan actually costs, concretely: for an Orca-worktree provider, deleting two agents left behind two git worktrees, two branches, and a live goose acp process still attached to a checkout for an agent that no longer exists. Nothing in Buzz knew, and nothing would ever have cleaned it up — a provider's same-key reap only fires on redeploy, which by definition never happens for a deleted agent.
Not asking for anything beyond what this issue already proposes — mainly recording that "no management surface" understates it slightly: the controls are present and appear to work, which is worse than their being absent.
Context: macOS, Buzz Desktop 0.5.8, agent runtime buzz-agent, out-of-tree provider running agents in Orca worktrees.
Follow-up with a third data point: the two stop controls fail in opposite directions for a provider-backed agent, and both leave the record disagreeing with reality.
| Control | Effect on the remote process | Effect on the record |
|---|---|---|
| Agent profile → Shutdown | none — harness still running | unchanged (is_active: true) |
| Agents → Stop running agents | kills it — harness gone | unchanged (is_active: true, last_stopped_at: null) |
| Agent profile → Start | none — already deployed | unchanged |
So:
- per-agent Shutdown claims to act and doesn't,
- the global Stop does act — surprisingly, since there is no
undeployop — but doesn't record it, - and afterwards the record asserts
is_active: truefor an agent whose process no longer exists.
The last row is the one that bites: nothing in the UI or the record distinguishes "running remotely" from "was running, now dead", so a provider-backed agent that has been stopped looks identical to one that is healthy.
There is a further consequence specific to providers that pass secrets by file: mine writes the agent environment to a 0600 file and has the launch command source then immediately rm it, so the nsec exists on disk for milliseconds. That is good hygiene, but it means nothing can restart the harness in place — the credentials are gone. Once the global Stop kills it, the only route back is delete-and-redeploy, which (per this issue) orphans the substrate object. So the global Stop is effectively destructive for provider agents while presenting as an ordinary stop.
Not asking for anything beyond what this issue proposes; recording it because "no management surface" reads as absent controls, and the more accurate description is controls that report success while doing nothing, or act without recording it.
Buzz Desktop 0.5.8, macOS, runtime buzz-agent, out-of-tree buzz-backend-* provider.
A fourth angle on "management is pinned to the desktop that created the agent", from the other end: the one flow that looks like it should recover that situation — Import — is a create that cannot choose a backend, and it fails silently.
The obvious move for an owner whose creating desktop is gone is to export the agent and import it somewhere else. That path exists, it succeeds, and it produces a local agent. Nothing says so.
Why it can't do otherwise
Three separate decisions compose into it. Verified against main at
be48ce98bd163899197b79a82ad5b2bcf0bc9b54.
-
The snapshot format deliberately omits backend.
agent_snapshot.rs:29listsbackend— withbackend_agent_idandprovider_binary_path— in the never-serialized set, "machine-local / secret fields are deliberately absent" (:88). Correct:provider_binary_pathis a path on someone else's filesystem, and this issue's own point is thatbackend_agent_idmeans nothing to a second desktop. -
Backend is settable only at create.
CreateManagedAgentRequestcarriesbackend: BackendKind(managed_agents/types/requests.rs:178);UpdateManagedAgentRequest(:201-256) has no backend field. Deliberate, and the reason is written down —desktop/src/features/agents/ui/RunOnSummarySection.tsx:8-10: "where an agent runs is fixed at creation (a provider-backed agent's deployment holds its private key; there is no migrate operation)." (NoteUpdateManagedAgentRequest.providerat:248is the model provider, not the backend.) -
Import is a create, and it hardcodes Local.
confirm_agent_snapshot_importbuilds the record withbackend: crate::managed_agents::BackendKind::Local(commands/personas/snapshot/import.rs:627). It does not route throughCreateManagedAgentRequest, so the one field that can only be set here is not exposed here. The team path does the same (commands/team_snapshot.rs:580).
Each is defensible alone. Composed, importing an agent commits you to a local agent permanently, at the moment you were trying to un-strand a remote one, and the only exit is to hand-recreate the agent through the create dialog and re-enter every field the snapshot just carried for you.
What the user sees
Nothing. The import dialog's manifest note
(AgentSnapshotImportDialog.tsx:295) tells the user that "credentials, and
source identity are not part of the snapshot format", which is true and is
about secrets. It does not say the agent will run on this computer, and the
edit dialog's "Run on" section is read-only by design, so the discovery happens
after the fact.
What I'm not asking for
Not that the snapshot carry backend — it shouldn't, for the reasons in (1),
and a backend blob is exactly the sort of machine-local state this issue argues
should be re-derived rather than copied.
The narrow ask is that Import expose the same "Run on" question the create dialog already asks, since it is a create. That is additive to whatever this issue's cross-device sync lands: sync gives a second desktop a record it can manage; import is the path for an owner who has no record to sync from.
Adjacent, already filed — not re-arguing here
Persona/agent packs have the same create-only limitation and additionally
cannot ship skills (agent_snapshot.rs:17, "Zip is NOT in v1 — deferred to v2
for skills bundling"). That half is already covered by #4111 and #5267;
pointing at them rather than restating.
Context: macOS, out-of-tree buzz-backend-* provider running agents in
Orca worktrees.