{"record":{"id":"a753891c80bca144","repo":"Hmbown/CodeWhale","slug":"failed-to-validate-runtime-thread-route-reason","errorCode":null,"errorMessage":"Failed to validate runtime thread route: {reason}","messagePattern":"Failed to validate runtime thread route: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/src/runtime_threads.rs","lineNumber":5999,"sourceCode":"                    .as_setting()\n                    .to_string()\n            });\n            (route, reasoning_effort, auto_controls_reasoning)\n        } else {\n            (\n                resolve_runtime_thread_route_for_identity(\n                    &cfg_snapshot,\n                    &identity,\n                    Some(&requested_model),\n                )?,\n                None,\n                false,\n            )\n        };\n        let route = if client_preflight_required {\n            route\n                .preflight()\n                .map_err(|reason| anyhow!(\"Failed to validate runtime thread route: {reason}\"))?\n        } else {\n            route\n        };\n        let configured_sandbox_mode = route.config.sandbox_mode.clone();\n        let provider = route.identity.provider;\n        let provider_identity = route.identity.clone();\n        let model = route.model.clone();\n        let route_limits = known_route_limits(route.candidate.limits());\n        let settings = crate::settings::Settings::load().unwrap_or_default();\n        let mut compaction = runtime_compaction_config(\n            provider,\n            &model,\n            route_limits,\n            settings.auto_compact,\n            crate::settings::Settings::auto_compact_explicitly_configured(),\n            settings.auto_compact_threshold_percent,\n        );\n        let now = Utc::now();","sourceCodeStart":5981,"sourceCodeEnd":6017,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/0c42157ee52f9d55af2b506d71b46249910f77d3/crates/tui/src/runtime_threads.rs#L5981-L6017","documentation":"The resolved runtime thread route failed its client preflight check ({reason} carries the detail — typically credentials, reachability, or model availability), so the turn is refused before starting.","triggerScenarios":"Thrown at crates/tui/src/runtime_threads.rs:5999 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Read {reason} and fix the underlying credential or connectivity issue","Verify the provider endpoint and model are available","Retry the request once the preflight cause is resolved"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0c42157ee52f9d55af2b506d71b46249910f77d3","analyzedAt":"2026-08-20T21:50:45.477Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}