zeroclaw-labs/zeroclaw · error · anyhow::Error
No aliased agent found with name
Error message
No aliased agent found with name '{name}' What it means
Fires in handle_remove_agent when a removal request names an agent that does not exist in the persisted delegate-agent configuration (cfg.agents.remove returns None). Removal is only valid for previously upserted aliased agents; this is an existence guard preventing silently-successful no-op deletes. Check the configured agent names (e.g. via an upsert snapshot or list) and retry with an existing alias.
Solutions
- Create the aliased agent first (upsert_agent), or correct the name.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/zeroclaw-tools/src/model_routing_config.rs:1005 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of zeroclaw-labs/zeroclaw@88bb9c8533 (2026-08-23).
Data as JSON: /api/errors/ee177cd05fb802c1.
Report an issue: GitHub.
Appendix: source
Thrown at crates/zeroclaw-tools/src/model_routing_config.rs:1005
Ok(ToolResult {
success: true,
output: serde_json::to_string_pretty(&json!({
"message": "Delegate agent upserted",
"name": name,
"config": Self::snapshot(&cfg),
}))?
.into(),
error: None,
})
}
async fn handle_remove_agent(&self, args: &Value) -> anyhow::Result<ToolResult> {
let name = Self::parse_non_empty_string(args, "name")?;
let mut cfg = self.load_config_without_env()?;
if cfg.agents.remove(&name).is_none() {
anyhow::bail!("No aliased agent found with name '{name}'");
}
cfg.save().await?;
Ok(ToolResult {
success: true,
output: serde_json::to_string_pretty(&json!({
"message": "Aliased agent removed",
"name": name,
"config": Self::snapshot(&cfg),
}))?
.into(),
error: None,
})
}
}
#[async_trait]View on GitHub (pinned to 88bb9c8533)