{"record":{"id":"3e017746e444043c","repo":"zeroclaw-labs/zeroclaw","slug":"no-scenario-found-for-hint-hint","errorCode":null,"errorMessage":"No scenario found for hint '{hint}'","messagePattern":"No scenario found for hint '(.+?)'","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/zeroclaw-tools/src/model_routing_config.rs","lineNumber":850,"sourceCode":"            .unwrap_or(true);\n\n        let mut cfg = self.load_config_without_env()?;\n\n        let before_routes = cfg.model_routes.len();\n        cfg.model_routes.retain(|route| route.hint != hint);\n        let routes_removed = before_routes.saturating_sub(cfg.model_routes.len());\n\n        let mut rules_removed = 0usize;\n        if remove_classification {\n            let before_rules = cfg.query_classification.rules.len();\n            cfg.query_classification\n                .rules\n                .retain(|rule| rule.hint != hint);\n            rules_removed = before_rules.saturating_sub(cfg.query_classification.rules.len());\n        }\n\n        if routes_removed == 0 && rules_removed == 0 {\n            anyhow::bail!(\"No scenario found for hint '{hint}'\");\n        }\n\n        Self::normalize_and_sort_routes(&mut cfg.model_routes);\n        Self::normalize_and_sort_rules(&mut cfg.query_classification.rules);\n        cfg.query_classification.enabled = !cfg.query_classification.rules.is_empty();\n\n        cfg.save().await?;\n\n        Ok(ToolResult {\n            success: true,\n            output: serde_json::to_string_pretty(&json!({\n                \"message\": \"Scenario removed\",\n                \"hint\": hint,\n                \"routes_removed\": routes_removed,\n                \"classification_rules_removed\": rules_removed,\n                \"config\": Self::snapshot(&cfg),\n            }))?\n            .into(),","sourceCodeStart":832,"sourceCodeEnd":868,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-tools/src/model_routing_config.rs#L832-L868","documentation":"Error \"No scenario found for hint '{hint}'\" thrown in zeroclaw-labs/zeroclaw.","triggerScenarios":"Thrown at crates/zeroclaw-tools/src/model_routing_config.rs:850 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Create a scenario for the hint first (upsert_scenario), then reference it."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}