zeroclaw-labs/zeroclaw · error · anyhow::Error
'max_depth' must be greater than 0
Error message
'max_depth' must be greater than 0
What it means
Error "'max_depth' must be greater than 0" thrown in zeroclaw-labs/zeroclaw.
Source
Thrown at crates/zeroclaw-tools/src/model_routing_config.rs:966
}
// synthesize runtime_profiles[name] from agentic/max_iterations/max_depth.
{
let runtime = cfg.runtime_profiles.entry(name.clone()).or_default();
if let Some(agentic) = agentic_update {
runtime.agentic = agentic;
}
if let MaybeSet::Set(iters) = max_iterations_update {
if iters == 0 {
anyhow::bail!("'max_iterations' must be greater than 0");
}
runtime.max_tool_iterations = iters;
} else if runtime.max_tool_iterations == 0 {
runtime.max_tool_iterations = DEFAULT_AGENT_MAX_ITERATIONS;
}
if let MaybeSet::Set(depth) = max_depth_update {
if depth == 0 {
anyhow::bail!("'max_depth' must be greater than 0");
}
runtime.max_delegation_depth = depth;
} else if runtime.max_delegation_depth == 0 {
runtime.max_delegation_depth = DEFAULT_AGENT_MAX_DEPTH;
}
}
// Get or create the agent and wire up alias references.
let next_agent = cfg.agents.entry(name.clone()).or_default();
next_agent.model_provider = agent_model_provider_ref.into();
next_agent.risk_profile = name.clone().into();
next_agent.runtime_profile = name.clone().into();
if let Some(same_profile) = delegate_same_risk_profile_update {
next_agent.delegate_same_risk_profile = same_profile;
}
if let Some(delegates) = delegates_update {
next_agent.delegates = delegates;
}View on GitHub (pinned to 88bb9c8533)
Solutions
- Set max_depth to a value greater than 0.
When it happens
Trigger: Thrown at crates/zeroclaw-tools/src/model_routing_config.rs:966 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of zeroclaw-labs/zeroclaw@88bb9c8533 (2026-08-23).
Data as JSON: /api/errors/e9ddc5c0aaa91b93.
Report an issue: GitHub.