Agent defaults: "Couldn't save." discards the backend validation message, making the failure undiagnosable
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 82/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Tranquilla
- Stack tecnologico
- rust, typescript
- Ambito
- desktop
Direzione di ricerca
Inizia in desktop/src/features/agents/ui/AgentDefaultsEditor.tsx intorno alla riga 233 e ispeziona la struttura dell'errore restituita dalla chiamata Tauri set_global_agent_config. Riproduci il fallimento della validazione con una chiave di provider o model derivata in env_vars, quindi verifica che venga mostrato il messaggio di validazione del backend invece del solo "Couldn't save.".
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
AgentDefaultsEditor discards the backend's validation message and shows a bare "Couldn't save." The backend's reason is accurate and actionable — it just never reaches the user.
Result: a save that can never succeed, with no indication of why, anywhere. No app log, no relay log (even at DEBUG), no config file touched.
Reproduce
- Put a derived provider/model key into the global agent config's
env_vars— e.g.GOOSE_PROVIDERorGOOSE_MODEL(easy to do if you have editedglobal-agent-config.jsondirectly, e.g. as a workaround for a provider issue). - Open Agents → Agent defaults, change the harness or model, press Save defaults.
- Every save fails with
Couldn't save.and no further detail.
Cause
The backend correctly rejects it — desktop/src-tauri/src/managed_agents/global_config/mod.rs:113:
if !derived.is_empty() {
return Err(format!(
"the following keys must be set via the structured provider/model fields, \
not as env vars: {}",
derived.join(", ")
));
}
against DERIVED_PROVIDER_MODEL_ENV_KEYS (GOOSE_MODEL, GOOSE_PROVIDER, BUZZ_AGENT_MODEL, BUZZ_AGENT_PROVIDER).
The rule itself is right — Buzz derives those vars from the structured fields, so allowing both would create two sources of truth. The problem is purely that the message is thrown away in desktop/src/features/agents/ui/AgentDefaultsEditor.tsx:233:
} catch (err) {
setSaveState("error");
setSaveError(typeof err === "string" ? err : "Couldn't save.");
}
set_global_agent_config returns Result<GlobalAgentConfigSaveResult, String>, so the reason is a string on the Rust side — but whatever reaches the catch fails the typeof err === "string" test (Tauri appears to wrap it), so the fallback always wins.
Suggested fix
Unwrap the Tauri error rather than testing it as a bare string, e.g.:
const message =
typeof err === "string" ? err :
(err as { message?: string })?.message ?? "Couldn't save.";
setSaveError(message);
Even surfacing String(err) would be a large improvement over the current dead end.
Impact
The validation is a guard rail users are quite likely to hit — anyone who has hand-edited global-agent-config.json to work around a provider problem will land on it. As shipped, the only way to discover the cause is to read the Rust source.
Environment
- Buzz Desktop 0.5.x, macOS arm64
- Relay: self-hosted, built from source
Related
Same family as #3636 and #4278 — a correct signal produced internally, then discarded before it reaches the operator.
- Lingua principale
- Rust
- Stelle
- 33.7k
- Fork
- 4.4k
- Merge medio
- 1g 21h
- PR unite (30g)
- 239
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di block/buzz
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
-
workflow_sink's mention parser never masks code regions — @name inside a code span wakes the agent Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
Difficoltà 2/5 Mezza giornata Idoneità per principianti 88/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
gitbutlerapp/gitbutler#15998 · 1 commento ·
-
bug triage:deciding
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
open-telemetry/otel-arrow#4132 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100