zeroclaw-labs/zeroclaw · error · anyhow::Error
No scenario found for hint '{hint}'
Error message
No scenario found for hint '{hint}' What it means
Error "No scenario found for hint '{hint}'" thrown in zeroclaw-labs/zeroclaw.
Source
Thrown at crates/zeroclaw-tools/src/model_routing_config.rs:850
.unwrap_or(true);
let mut cfg = self.load_config_without_env()?;
let before_routes = cfg.model_routes.len();
cfg.model_routes.retain(|route| route.hint != hint);
let routes_removed = before_routes.saturating_sub(cfg.model_routes.len());
let mut rules_removed = 0usize;
if remove_classification {
let before_rules = cfg.query_classification.rules.len();
cfg.query_classification
.rules
.retain(|rule| rule.hint != hint);
rules_removed = before_rules.saturating_sub(cfg.query_classification.rules.len());
}
if routes_removed == 0 && rules_removed == 0 {
anyhow::bail!("No scenario found for hint '{hint}'");
}
Self::normalize_and_sort_routes(&mut cfg.model_routes);
Self::normalize_and_sort_rules(&mut cfg.query_classification.rules);
cfg.query_classification.enabled = !cfg.query_classification.rules.is_empty();
cfg.save().await?;
Ok(ToolResult {
success: true,
output: serde_json::to_string_pretty(&json!({
"message": "Scenario removed",
"hint": hint,
"routes_removed": routes_removed,
"classification_rules_removed": rules_removed,
"config": Self::snapshot(&cfg),
}))?
.into(),View on GitHub (pinned to 88bb9c8533)
Solutions
- Create a scenario for the hint first (upsert_scenario), then reference it.
When it happens
Trigger: Thrown at crates/zeroclaw-tools/src/model_routing_config.rs:850 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/3e017746e444043c.
Report an issue: GitHub.