Provider-backed agent config saves do not trigger redeployment
- Dominant language
- Rust
- Stars
- 32.7k
- Forks
- 4.3k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 253
Description
## Describe the bug
Saving configuration changes for a provider-backed managed agent updates `managed-agents.json`, but does not invoke the external provider again. The provider therefore continues running the previous configuration even though Desktop shows the newly saved value.
For example, changing a provider-backed agent from one model to another updates the model shown in Buzz Desktop, but subsequent mentions still execute with the old model until the provider is manually redeployed.
## To reproduce
1. Install an external `buzz-backend-*` provider.
2. Create/deploy a managed agent through that provider with model A.
3. Edit the agent in Buzz Desktop, change it to model B, and save.
4. Send the agent another mention.
5. Observe that the provider continues using model A.
## Expected behavior
After a successful explicit save, Buzz should invoke the provider protocol’s idempotent `deploy` operation with the updated canonical agent record and provider config. The provider contract already defines repeated deploys as update-in-place/no-op, so a separate shutdown is not required.
## Actual behavior
`update_managed_agent` persists the record locally but never calls `deploy_to_provider`. Provider deploy is currently reached by create/start paths only.
The Desktop Shutdown action is not a substitute for redeployment: provider protocol v1 has no shutdown operation, and the UI shutdown path sends `!shutdown` into a channel. It can also report “Cannot stop: agent is not in any channel” even when channel membership exists if the relay agent directory entry has no channel IDs.
## Environment
- OS: macOS
- Buzz Desktop: v0.4.24
- Backend: external provider (`BackendKind::Provider`)
## Additional context
The provider protocol documents `deploy` as idempotent. The smallest fix is to invoke it after `update_managed_agent` completes its local save/profile-sync phase, and refresh the returned summary from the provider-updated record. Local agents should retain their existing next-spawn behavior.
Contributor guide
Assessment
This issue has not been assessed yet.