{"record":{"id":"efcdd933bd5129f3","repo":"zeroclaw-labs/zeroclaw","slug":"level-tool-freeze-requires-at-least-one-tool","errorCode":null,"errorMessage":"--level tool-freeze requires at least one --tool","messagePattern":"--level tool-freeze requires at least one --tool","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/main.rs","lineNumber":6606,"sourceCode":"        }\n        EstopLevelArg::NetworkKill => {\n            if !domains.is_empty() || !tools.is_empty() {\n                bail!(\"--domain/--tool are not valid with --level network-kill\");\n            }\n            Ok(security::EstopLevel::NetworkKill)\n        }\n        EstopLevelArg::DomainBlock => {\n            if domains.is_empty() {\n                bail!(\"--level domain-block requires at least one --domain\");\n            }\n            if !tools.is_empty() {\n                bail!(\"--tool is not valid with --level domain-block\");\n            }\n            Ok(security::EstopLevel::DomainBlock(domains))\n        }\n        EstopLevelArg::ToolFreeze => {\n            if tools.is_empty() {\n                bail!(\"--level tool-freeze requires at least one --tool\");\n            }\n            if !domains.is_empty() {\n                bail!(\"--domain is not valid with --level tool-freeze\");\n            }\n            Ok(security::EstopLevel::ToolFreeze(tools))\n        }\n    }\n}\n\n#[cfg(feature = \"agent-runtime\")]\nfn build_resume_selector(\n    network: bool,\n    domains: Vec<String>,\n    tools: Vec<String>,\n) -> Result<security::ResumeSelector> {\n    let selected =\n        usize::from(network) + usize::from(!domains.is_empty()) + usize::from(!tools.is_empty());\n    if selected > 1 {","sourceCodeStart":6588,"sourceCodeEnd":6624,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/src/main.rs#L6588-L6624","documentation":"The tool-freeze level freezes named tools, so at least one `--tool` is required; `build_engage_level` bails when the tools list is empty before engaging.","triggerScenarios":"`zeroclaw estop --level tool-freeze` with no `--tool` flags supplied.","commonSituations":"Typo in the flag name (`--tools`); empty/unexpanded tool list variable in automation; forgetting the selector when adapting a domain-block example.","solutions":["Add one or more `--tool <name>` values","Check flag spelling and shell expansion: the flag is `--tool` (repeatable) and variables must expand non-empty","Use no `--level` (kill-all default) if a global stop was intended"],"exampleFix":"# before\nzeroclaw estop --level tool-freeze\n# after\nzeroclaw estop --level tool-freeze --tool shell","handlingStrategy":"validation","validationCode":"if [ \"$level\" = \"tool-freeze\" ] && [ \"${#tools[@]}\" -eq 0 ]; then\n  echo \"--level tool-freeze requires at least one --tool\"; exit 2\nfi","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate the tool list against known tool names before engaging a freeze","Use `set -u` and explicit array initialization so empty lists are impossible"],"tags":["cli","estop","arguments","zeroclaw"],"backgroundTag":"missing-required-flag","analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}