zeroclaw-labs/zeroclaw · error · anyhow::Error

--domain is not valid with --level tool-freeze

Error message

--domain is not valid with --level tool-freeze

What it means

With `--level tool-freeze`, `--domain` values are meaningless and rejected; tools are the only selector for that level, and each engagement takes exactly one selector kind.

Source

Thrown at src/main.rs:6609

                bail!("--domain/--tool are not valid with --level network-kill");
            }
            Ok(security::EstopLevel::NetworkKill)
        }
        EstopLevelArg::DomainBlock => {
            if domains.is_empty() {
                bail!("--level domain-block requires at least one --domain");
            }
            if !tools.is_empty() {
                bail!("--tool is not valid with --level domain-block");
            }
            Ok(security::EstopLevel::DomainBlock(domains))
        }
        EstopLevelArg::ToolFreeze => {
            if tools.is_empty() {
                bail!("--level tool-freeze requires at least one --tool");
            }
            if !domains.is_empty() {
                bail!("--domain is not valid with --level tool-freeze");
            }
            Ok(security::EstopLevel::ToolFreeze(tools))
        }
    }
}

#[cfg(feature = "agent-runtime")]
fn build_resume_selector(
    network: bool,
    domains: Vec<String>,
    tools: Vec<String>,
) -> Result<security::ResumeSelector> {
    let selected =
        usize::from(network) + usize::from(!domains.is_empty()) + usize::from(!tools.is_empty());
    if selected > 1 {
        bail!("Use only one of --network, --domain, or --tool for estop resume");
    }
    if network {

View on GitHub (pinned to 88bb9c8533)

Solutions

  1. Drop `--domain` for the tool freeze
  2. Engage domain-block as a separate command: `zeroclaw estop --level domain-block --domain <d>`

Example fix

# before
zeroclaw estop --level tool-freeze --tool shell --domain a.com
# after
zeroclaw estop --level tool-freeze --tool shell
zeroclaw estop --level domain-block --domain a.com
Defensive patterns

Strategy: validation

Validate before calling

if [ "$level" = "tool-freeze" ] && [ "${#domains[@]}" -gt 0 ]; then
  echo "--domain is invalid with tool-freeze; engage domain-block separately"; exit 2
fi

Prevention

When it happens

Trigger: `zeroclaw estop --level tool-freeze --tool shell --domain a.com` — any domain list supplied alongside a tool-freeze engage.

Common situations: Combining flags from a domain-block runbook line into a tool-freeze invocation; assuming multiple lock scopes can be engaged in one command.

Related errors


AI-assisted analysis of zeroclaw-labs/zeroclaw@88bb9c8533 (2026-08-23). Data as JSON: /api/errors/f29ee9f39b025874. Report an issue: GitHub.