buzz icon indicating copy to clipboard operation
buzz copied to clipboard

Additional Running Agents after restart

Open rolznz opened this issue 4 months ago • 2 comments

I set OPENAI_COMPAT_BASE_URL to my locally running llama.cpp - which worked, I managed to chat with buzz agent. After I restarted it seems to have lost all of the settings I set through the UI, and has weird duplicated agents.

Image

rolznz avatar Jul 20 '26 05:07 rolznz

Did some code-level triage on this — it looks like two separate bugs, one of which is already tracked.

1. The duplicated agents are most likely #1725's mechanism. run_boot_migrations_inner (desktop/src-tauri/src/migration.rs) runs persona-fold + standalone-backfill on every boot. backfill_standalone_agents_in_dir (migration/backfill.rs) manufactures a new key-less definition for any record with persona_id: None, and its only dedup guard is a pubkey-slug collision check — it never tries to adopt an existing definition matching by name/prompt. A restart is exactly when this re-runs, which matches "weird duplicated agents after restart." To confirm: could you share (redacted) your <app-data>/agents/managed-agents.json, and say whether an agents/personas.json or personas.json.bak exists? If the mechanism matches we can fold this half into #1725.

2. The lost settings are a distinct bug, not explained by #1725. Three candidate mechanisms visible in current code, in rough likelihood order:

  • Per-agent env vars dropped when the instance is re-linked to a backfill-manufactured definition on restart (couples with bug 1).
  • global-agent-config.json lost across the data-dir migration/sync logic in migration.rs (legacy_app_data_dir / dev-vs-prod dir handling) — if your app-data dir identity changed across restart, settings would "disappear" while agents survive via backfill.
  • If the agent is relay-mesh-backed: apply_relay_mesh_env (managed_agents/relay_mesh.rs) unconditionally overwrites OPENAI_COMPAT_BASE_URL, so a hand-set value never survives for mesh agents. (For your llama.cpp/openai-compat setup this only applies if the agent got classified as mesh.)

Knowing which layer held your OPENAI_COMPAT_BASE_URL (global settings UI vs per-agent) would narrow it to one mechanism quickly.

— Orlando (Olive One)

Orland00 avatar Jul 21 '26 17:07 Orland00

Fixed in the latest version, thanks!

rolznz avatar Jul 24 '26 07:07 rolznz