{"record":{"id":"6cdca193d0afe1e6","repo":"Hmbown/CodeWhale","slug":"agent-profile-reasoning-effort-value-must-b","errorCode":null,"errorMessage":"agent profile {} reasoning_effort {value:?} must be one of: inherit, auto, off, low, medium, high, max","messagePattern":"agent profile (.+?) reasoning_effort (.+?) must be one of: inherit, auto, off, low, medium, high, max","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/src/fleet/profile.rs","lineNumber":586,"sourceCode":"}\n\nfn normalize_agent_profile_reasoning_effort(\n    path: &Path,\n    value: Option<&str>,\n) -> Result<Option<String>> {\n    let Some(value) = non_empty_trimmed(value) else {\n        return Ok(None);\n    };\n    if matches!(\n        value.to_ascii_lowercase().as_str(),\n        \"inherit\" | \"parent\" | \"same\" | \"current\" | \"default\" | \"unset\"\n    ) {\n        return Ok(None);\n    }\n    ReasoningEffort::parse_strict(value)\n        .map(|effort| Some(effort.as_setting().to_string()))\n        .map_err(|_| {\n            anyhow!(\n                \"agent profile {} reasoning_effort {value:?} must be one of: inherit, auto, off, low, medium, high, max\",\n                path.display()\n            )\n        })\n}\n\nfn is_agent_profile_token_char(ch: char) -> bool {\n    ch.is_ascii_alphanumeric() || matches!(ch, '-' | '_' | '.')\n}\n\nfn is_model_hint(value: &str) -> bool {\n    let trimmed = value.trim();\n    !trimmed.is_empty()\n        && trimmed == value\n        && trimmed\n            .chars()\n            .all(|ch| ch.is_ascii_graphic() && !matches!(ch, '=' | '\\'' | '\"'))\n}","sourceCodeStart":568,"sourceCodeEnd":604,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/tui/src/fleet/profile.rs#L568-L604","documentation":"Thrown by normalize_agent_profile_reasoning_effort when an agent profile's reasoning_effort value is present but is not one of the accepted enum values: inherit, auto, off, low, medium, high, max. The strict parser (ReasoningEffort::parse_strict) rejects the raw string and this anyhow error echoes the value with debug formatting plus the file path. It is a per-field enum validation gate applied while converting AgentProfileToml into an AgentProfile.","triggerScenarios":"An agent profile .toml contains reasoning_effort = \"<anything else>\" — e.g. \"medium-high\", \"Medium\" (case-sensitive), \"xhigh\", an empty string, or a numeric value — and agent_profile_from_toml normalizes it.","commonSituations":"Copied a reasoning_effort value from another tool's config with different vocabulary; casing mismatch; thought 'ultra'/'extreme' were valid; left a placeholder value in the file.","solutions":["Set reasoning_effort in the profile to exactly one of: inherit, auto, off, low, medium, high, max (lowercase).","Delete the reasoning_effort key entirely to inherit the default.","If a custom intensity was intended, choose the nearest supported level (e.g. 'high' or 'max')."],"exampleFix":"// before\nreasoning_effort = \"Ultra\"\n// after\nreasoning_effort = \"max\"","handlingStrategy":"validation","validationCode":"// Rust\nconst VALID: [&str; 7] = [\"inherit\",\"auto\",\"off\",\"low\",\"medium\",\"high\",\"max\"];\nif let Some(v) = parsed.reasoning_effort.as_deref() {\n    assert!(VALID.contains(&v), \"bad reasoning_effort {v}\");\n}","typeGuard":"fn is_valid_effort(v: &str) -> bool {\n    matches!(v, \"inherit\"|\"auto\"|\"off\"|\"low\"|\"medium\"|\"high\"|\"max\")\n}","tryCatchPattern":null,"preventionTips":["Only copy reasoning_effort values from the supported list; remember it is lowercase and case-sensitive.","Omit the key rather than inventing values when unsure.","Editor autocomplete/snippets for profile files prevent typos."],"tags":["enum","validation","configuration","agent-profile"],"backgroundTag":"invalid-enum-value","analyzedSha":"73e0f67d83c59909b571efdfc88c4bc28c309cb1","analyzedAt":"2026-09-22T01:30:00.501Z","contentChangedAt":"2026-09-22T01:30:00.501Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}