Hmbown/CodeWhale · error · anyhow::Error
Invalid verbosity '{v}': expected normal or concise.
Error message
Invalid verbosity '{v}': expected normal or concise. What it means
Config::validate() accepts only 'normal' or 'concise' for the verbosity setting after trim + ASCII lowercase normalization. Any other value aborts validation. This controls response verbosity, not log level, so values like 'debug' or 'quiet' are rejected.
Source
Thrown at crates/tui/src/config.rs:4429
"Invalid default_text_model '{model}' for provider '{}': expected auto or a model ID this provider serves{hint}.",
provider.as_str()
);
}
if let Some(policy) = self.approval_policy.as_deref() {
let normalized = policy.trim().to_ascii_lowercase();
if !matches!(
normalized.as_str(),
"on-request" | "untrusted" | "never" | "auto" | "suggest"
) {
anyhow::bail!(
"Invalid approval_policy '{policy}': expected on-request, untrusted, never, auto, or suggest."
);
}
}
if let Some(v) = self.verbosity.as_deref() {
let normalized = v.trim().to_ascii_lowercase();
if !matches!(normalized.as_str(), "normal" | "concise") {
anyhow::bail!("Invalid verbosity '{v}': expected normal or concise.");
}
}
if let Some(mode) = self.sandbox_mode.as_deref() {
let normalized = mode.trim().to_ascii_lowercase();
if !matches!(
normalized.as_str(),
"read-only" | "workspace-write" | "danger-full-access" | "external-sandbox"
) {
anyhow::bail!(
"Invalid sandbox_mode '{mode}': expected read-only, workspace-write, danger-full-access, or external-sandbox."
);
}
}
if let Some(tui) = &self.tui
&& let Some(mode) = tui.alternate_screen.as_deref()
{
let mode = mode.to_ascii_lowercase();
if !matches!(mode.as_str(), "auto" | "always" | "never") {View on GitHub (pinned to 8880682c63)
Solutions
- Set verbosity = "normal" or verbosity = "concise".
- Delete the key to use the default.
- If you wanted log filtering, use the logging-specific configuration instead of verbosity.
Example fix
# before verbosity = "verbose" # after verbosity = "concise"
Defensive patterns
Strategy: validation
Validate before calling
fn verbosity_is_valid(raw: &str) -> bool {
matches!(raw.trim().to_ascii_lowercase().as_str(), "normal" | "concise")
}
if let Some(v) = &config.verbosity {
anyhow::ensure!(verbosity_is_valid(v), "verbosity must be normal or concise");
} Type guard
fn is_valid_verbosity(raw: &str) -> bool {
matches!(raw.trim().to_ascii_lowercase().as_str(), "normal" | "concise")
} Try / catch
match config.validate() {
Err(e) if e.to_string().starts_with("Invalid verbosity") => {
config.verbosity = None; // drop to default instead of failing
config.validate()?
}
other => other,
} Prevention
- Remember verbosity is output style (normal/concise), not a log level.
- Prefer omitting the key unless you specifically need concise output.
When it happens
Trigger: Setting verbosity = "verbose", "quiet", or "terse" in config.toml; carrying over a log-level-style value from another tool.
Common situations: Users assume verbosity is a log filter and try 'debug'/'trace'; config snippets shared online use invalid synonyms.
Related errors
- Invalid default_text_model '{model}' for provider '{}': expe
- Invalid approval_policy '{policy}': expected on-request, unt
- Invalid sandbox_mode '{mode}': expected read-only, workspace
- Invalid tui.alternate_screen '{mode}': expected auto, always
- unavailable credential
AI-assisted analysis of Hmbown/CodeWhale@8880682c63 (2026-08-16).
Data as JSON: /api/errors/c898ad1f46c1bd52.
Report an issue: GitHub.