Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions desktop/src-tauri/src/commands/agents.rs
Original file line number Diff line number Diff line change
Expand Up @@ -867,9 +867,13 @@ pub async fn start_managed_agent(
reconcile_agent_profile(&state, &reconcile_app, &reconcile_pubkey, &reconcile_data)
.await
{
eprintln!(
"buzz-desktop: profile reconciliation failed for agent {reconcile_pubkey}: {e}"
);
// Suppress the expected relay-unreachable case; see the same
// guard in restore.rs's boot reconcile path for the rationale.
if !e.starts_with("relay unreachable:") {
eprintln!(
"buzz-desktop: profile reconciliation failed for agent {reconcile_pubkey}: {e}"
);
}
}
});
}
Expand Down
12 changes: 11 additions & 1 deletion desktop/src-tauri/src/managed_agents/restore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,17 @@ pub async fn restore_managed_agents_on_launch(
crate::commands::reconcile_agent_profile(&state, &reconcile_app, &pubkey, &data)
.await
{
eprintln!("buzz-desktop: profile reconciliation failed for agent {pubkey}: {e}");
// A local agent may deliberately target a relay that isn't
// running (e.g. ws://localhost:3000 between boots); the relay
// helper marks every such case with the "relay unreachable:"
// prefix (see relay.rs). That's expected, not a failure worth
// a per-agent line every boot — only genuine reconcile errors
// surface loudly.
if !e.starts_with("relay unreachable:") {
eprintln!(
"buzz-desktop: profile reconciliation failed for agent {pubkey}: {e}"
);
}
}
});
}
Expand Down
9 changes: 7 additions & 2 deletions desktop/src-tauri/src/relay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,11 +211,16 @@ pub(crate) async fn parse_json_response<T: DeserializeOwned>(
return Err(msg);
}

// Drop the reqwest error detail — it contains the raw URL.
// A successful HTTP response whose body fails to deserialize means the relay
// was reached but returned something unexpected (protocol mismatch, relay bug,
// corrupted body) — NOT a connectivity failure. Keep it off the
// "relay unreachable:" bucket so it surfaces loudly instead of being treated
// as a transient unreachable-relay condition. The reqwest error detail is
// dropped because it contains the raw URL.
response
.json::<T>()
.await
.map_err(|_| "relay unreachable: response was not valid JSON".to_string())
.map_err(|_| "relay returned malformed response: not valid JSON".to_string())
}

pub async fn relay_error_message(response: reqwest::Response) -> String {
Expand Down
4 changes: 2 additions & 2 deletions desktop/src/features/agents/ui/CreateAgentDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export function CreateAgentDialog({
const backendProvidersQuery = useBackendProvidersQuery();
const { lastRuntimeId, setLastRuntime } = useLastRuntime();
const [acpCommand, setAcpCommand] = React.useState("buzz-acp");
const [agentCommand, setAgentCommand] = React.useState("goose");
const [agentCommand, setAgentCommand] = React.useState("buzz-agent");
const [agentArgs, setAgentArgs] = React.useState("acp");
const [mcpCommand, setMcpCommand] = React.useState("");
const [mcpToolsets, setMcpToolsets] = React.useState("");
Expand Down Expand Up @@ -236,7 +236,7 @@ export function CreateAgentDialog({
setSpawnAfterCreate(true);
setStartOnAppLaunch(true);
setAcpCommand("buzz-acp");
setAgentCommand("goose");
setAgentCommand("buzz-agent");
setAgentArgs("acp");
setMcpCommand("");
setMcpToolsets("");
Expand Down