zed-industries/zed · error
auto_compact threshold of 0 is not valid
Error message
auto_compact threshold of 0 is not valid
What it means
Error "auto_compact threshold of 0 is not valid" thrown in zed-industries/zed.
Source
Thrown at crates/agent_settings/src/agent_settings.rs:198
.parse()
.with_context(|| format!("invalid auto_compact threshold percentage {raw:?}"))?;
anyhow::ensure!(
value > 0.0 && value <= 100.0,
"auto_compact threshold percentage must be between 0% and 100%, got {raw:?}"
);
Ok(AutoCompactThreshold::Percentage(value / 100.0))
} else {
let tokens: i64 = trimmed.parse().with_context(|| {
format!(
"invalid auto_compact threshold {raw:?}; \
expected a percentage like \"90%\" or an integer number of tokens"
)
})?;
match tokens.cmp(&0) {
Greater => Ok(AutoCompactThreshold::TokensUsed(tokens as u64)),
Less => Ok(AutoCompactThreshold::TokensRemaining(tokens.unsigned_abs())),
Equal => {
anyhow::bail!("auto_compact threshold of 0 is not valid")
}
}
}
}
#[derive(Clone, Debug, RegisterSetting)]
pub struct AgentSettings {
pub enabled: bool,
pub button: bool,
pub dock: DockPosition,
pub flexible: bool,
pub sidebar_side: SidebarDockPosition,
pub default_width: Pixels,
pub default_height: Pixels,
pub max_content_width: Option<Pixels>,
pub default_model: Option<LanguageModelSelection>,
pub subagent_model: Option<LanguageModelSelection>,
pub inline_assistant_model: Option<LanguageModelSelection>,View on GitHub (pinned to bc538def45)
When it happens
Trigger: Thrown at crates/agent_settings/src/agent_settings.rs:198 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of zed-industries/zed@bc538def45 (2026-08-16).
Data as JSON: /api/errors/3918c7f50edf687d.
Report an issue: GitHub.