Additional Running Agents after restart
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.
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.jsonlost across the data-dir migration/sync logic inmigration.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 overwritesOPENAI_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)
Fixed in the latest version, thanks!